A powerful tool that leverages the GPT-3.5 language model to create quizzes on any topic of your choice, based on an audio prompt input. This application is built using Python and Streamlit, making it easy to create, customize, and share quizzes with others.
Author : MARZOUG Ayoub.
- Requirements
- Installation
- Obtaining OpenAI API Keys
- Setting Secrets
- Executing the App
- Contributing
- License
To use the Quiz Generator, you need the following:
- Python 3.10 or higher
- An OpenAI API key to access GPT-3.5
- Clone the repository to your local machine:
git clone https://github.com/ayoub-mg/Audio-ChatGPT-to-Quiz-Form.git
- Change to the project directory:
cd Audio-ChatGPT-to-Quiz-Form
- Create a virtual environment and activate it:
python3 -m venv ayoub
source ayoub/bin/activate
Alternatively, you can use conda
to create a virtual environment:
conda create -n ayoub python=3.9
conda activate ayoub
- 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 the Audio Quiz Generator.
Open the audio_rec.py
file and add the following in line 16 :
API_KEY = <your-token>
After installing dependencies and setting secrets, execute the Exam Generator app by running:
streamlit run audio_rec.py
The Quiz Generator app should now be accessible in your web browser at http://localhost:8501
.