https://quiztube.orhankhanbayov.com
QuizTube is an application that allows users to turn any YouTube video into an interactive quiz. It was developed for the Lablab AI Hackathon, using the Whisper API and ChatGPT.
The application uses Python and Flask for the backend. The Lablab version downloads YouTube audio, uses Whisper for speech-to-text, and sends the transcribed text to ChatGPT to generate questions. Due to Whisper's limitations regarding speed, an alternative solution using the YouTube API to download captions is provided.
Before you begin, ensure you have met the following requirements:
- Python 3.6 or later
- pip
-
Clone the repository:
-
Change to the project directory:
cd quiztube
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in thebackend
folder:
cd backend
touch .env
- Open the
.env
file and add your API key:
API_KEY=your_api_key_here
- Start the Flask backend server:
python server.py
- Start the React server
cd frontend
npm run start
To generate a quiz from a YouTube video:
-
Make sure the backend server is running at
http://localhost:5000
. -
In your application frontend, input the YouTube video URL or video ID.
-
Submit the form, and the backend will process the video using the selected method to generate a quiz.
-
The generated quiz questions will be displayed in the frontend, allowing users to interact and answer the questions.