An interactive AI-powered quiz creation tool built with Streamlit and LangChain that uses GPT-4 to generate quizzes from your own documents (PDF/TXT) or web content (URLs).
The app processes your content, stores it in a FAISS vector database, and lets you create customized quizzes on any topic.
- Upload PDF or TXT files, or provide web URLs.
- Process documents into searchable vector embeddings using OpenAI embeddings.
- Create quizzes in multiple formats:
- Multiple Choice Questions (MCQ)
- True/False
- Fill-in-the-Blank
- Customizable number of questions.
- Download generated quizzes as text files.
git clone https://github.com/kumpatlapavankumar/EduBot-Smart-Quiz-Generator.git
cd smart-quiz-generatorpip install -r requirements.txtCreate a .env file in the project folder and add:
OPENAI_API_KEY=your_api_key_hereOr use Streamlit Secrets for deployment:
# .streamlit/secrets.toml
OPENAI_API_KEY = "your_api_key_here"Run the app locally:
streamlit run main.py- Paste URLs or upload PDF/TXT files.
- Click "🚀 Process Content" to store embeddings.
- Enter a topic (e.g., Machine Learning Basics).
- Select quiz type and number of questions.
- Click "✨ Generate Quiz" to create your quiz.
- Download the quiz as a
.txtfile.
.
├── main.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── quiz_vector_store.pkl # Generated FAISS vector store (after processing)
└── README.md # Documentation
- Python
- Streamlit – Web app framework
- LangChain – Document processing & LLM integration
- OpenAI GPT-4 – Quiz generation
- FAISS – Vector storage & retrieval
- PyMuPDF – PDF parsing
- nltk – Text processing
This project is licensed under the MIT License.
Pavankumar
💡 Powered by GPT-4, LangChain, and Streamlit.