Introducing GPT-QuestPro! As a parent, I found myself spending countless hours creating exam papers for my 10-year-old son, only to struggle with evaluating his progress afterward. This tedious process inspired me to develop GPT-QuestPro, leveraging the power of Chat-GPT to generate multiple-choice online exams effortlessly. With just a prompt, the app crafts customized question papers, allowing my son to test his knowledge in various subjects. Not only does this save valuable time for me, but it also provides my son with an engaging learning experience while enabling me to track his improvement effectively.
Additionally, the aim of the project extends beyond personal utility. It strives to educate individuals on accessing Chat-GPT programmatically to automate specific use cases. By demonstrating how GPT-QuestPro utilizes Chat-GPT to streamline the exam creation and evaluation process, the project empowers others to harness the capabilities of natural language processing technology for their own automation endeavors. GPT-QuestPro not only enhances personal productivity but also serves as a practical example of the potential applications of Chat-GPT in various domains.
- Requirements
- Installation
- Obtaining OpenAI API Keys
- Setting Secrets
- Setting Email
- Executing the App
- Contributing
- License
To use GPT QuestPro, you need the following:
- Python 3.8 or higher
- An OpenAI API key to access GPT-3.5
- Clone the repository to your local machine:
git clone https://github.com/ankur-katiyar/GPT-QuestPro.git
- Change to the project directory:
cd GPT-QuestPro
- Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
Alternatively, you can use conda
to create a virtual environment:
conda create -n GPT-QuestPro python=3.9
conda activate GPT-QuestPro
- Install the required packages from
requirements.txt
:
pip install -r requirements.txt
To obtain the necessary API key and organization from OpenAI, follow these steps:
- Go to the OpenAI website.
- If you don't have an account, click "Sign up" and create one.
- Once logged in, navigate to the API key management page.
- Click "Create new secret key" and note down the generated API key (you would not see the key again).
- On the same page, find your organization ID under the "Settings" section.
You now have the API key and organization ID required for GPT QuestPro.
Create new directory .streamlit
in the root directory of the project and create a new file secrets.toml
inside it.
mkdir .streamlit
touch .streamlit/secrets.toml
Open the secrets.toml
file and add the following lines:
OPENAI_TOKEN = <yout-token>
OPENAI_ORG = <your-org>
Note: If it's a personal account, you can leave OPENAI_ORG
as an empty string ("").
-
Open or Create
config.ini
File in the root directory:- If the
config.ini
file doesn't exist, create a new file namedconfig.ini
. - If it already exists, open the existing
config.ini
file.
- If the
-
Add Email Configuration:
- Under the
[Email]
section, fill in the following details:sender_email
: Your sender email address (e.g., "your_sender_email@gmail.com").receiver_email
: The recipient email address (e.g., "your_receiver_email@gmail.com").sender_password
: Your email account password.
- Under the
Note: Make sure that you don't enclose the values with double-quotes.
- Save the
config.ini
File:- Save the changes made to the
config.ini
file.
- Save the changes made to the
After installing dependencies and setting secrets, execute GPT QuestPro app by running:
streamlit run GPT-QuestPro.py
The GPT QuestPro app should now be accessible in your web browser at http://localhost:8501
.
-
Home Page
-
Generate Questions
Generate Questions by providing prompt. Change 'number of questions' and 'number of answers' as required.
-
Taking the Test
-
Result Page
Result page - summarizes the result with an option to send the summary to an email address.
-
Clarification & Download Questions
When reviewing the result, you can clarify the responses to a question or download the question in pdf format.
-
Questions Browser
This page allows to take the test on a question paper that had already been generated. This allows for saving the API calls to OpenAI.
-
Questions Editor
This page allows to edit questions and their responses in case Chat GPT provides incorrect answers or duplicate choices. This is frequent when dealing with math papers so always a good idea to review the questions before handing them over for examination.
I welcome contributions to improve GPT QuestPro. If you'd like to contribute, please fork the repository and create a pull request with your proposed changes. I'll review and merge the changes as appropriate.
This project is licensed under the MIT License. See the LICENSE file for more information.