Skip to content

Latest commit

 

History

History
162 lines (104 loc) · 5.86 KB

README.md

File metadata and controls

162 lines (104 loc) · 5.86 KB

GPT QuestPro powered by GPT-3.5 and written in Python/Streamlit

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.

Table of Contents

Requirements

To use GPT QuestPro, you need the following:

  • Python 3.8 or higher
  • An OpenAI API key to access GPT-3.5

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/ankur-katiyar/GPT-QuestPro.git
  1. Change to the project directory:
cd GPT-QuestPro
  1. 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
  1. Install the required packages from requirements.txt:
pip install -r requirements.txt

Obtaining OpenAI API Keys

To obtain the necessary API key and organization from OpenAI, follow these steps:

  1. Go to the OpenAI website.
  2. If you don't have an account, click "Sign up" and create one.
  3. Once logged in, navigate to the API key management page.
  4. Click "Create new secret key" and note down the generated API key (you would not see the key again).
  5. 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.

Setting Secrets

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 ("").

Setting Email

  1. Open or Create config.ini File in the root directory:

    • If the config.ini file doesn't exist, create a new file named config.ini.
    • If it already exists, open the existing config.ini file.
  2. Add Email Configuration:

Note: Make sure that you don't enclose the values with double-quotes.

  1. Save the config.ini File:
    • Save the changes made to the config.ini file.

Executing the App

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.

GPT-QuestPro

  1. Home Page

    Home Page Home Page.

  2. Generate Questions

    Generate Questions Generate Questions by providing prompt. Change 'number of questions' and 'number of answers' as required.

  3. Taking the Test

    Test Take the test.

  4. Result Page

    Result Result page - summarizes the result with an option to send the summary to an email address.

  5. Clarification & Download Questions

    Clarification & Download Questions When reviewing the result, you can clarify the responses to a question or download the question in pdf format.

  6. Questions Browser

    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.

  7. Questions Editor

    Question 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.

Contributing

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.

License

This project is licensed under the MIT License. See the LICENSE file for more information.