Skip to content

ayoub-mg/Audio-ChatGPT-to-Quiz-Form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Audio Quiz Generator

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.

Table of Contents

Requirements

To use the Quiz Generator, you need the following:

  • Python 3.10 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/ayoub-mg/Audio-ChatGPT-to-Quiz-Form.git
  1. Change to the project directory:
cd Audio-ChatGPT-to-Quiz-Form
  1. 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
  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 the Audio Quiz Generator.

Setting Tokens

Open the audio_rec.py file and add the following in line 16 :

 API_KEY = <your-token>

Executing the App

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.

Releases

No releases published

Packages

No packages published