TheQuizLab

TheQuizLab is an interactive Streamlit web app that intelligently generates quiz questions from any educational document. Whether you're a teacher, trainer, or student, this tool helps you quickly turn notes or handouts into personalized quizzes to boost learning and engagement.

0
0
0
Python
public

πŸ“š TheQuizLab – AI-Powered Quiz Generator

TheQuizLab is an interactive Streamlit web app that generates intelligent quiz questions from your documents using natural language processing. Ideal for educators, students, and trainers, it can turn lecture notes, reports, and articles into quizzes with just a few clicks.


πŸš€ Features

  • πŸ“ Upload support for .docx, .pdf, .txt, .csv, and .ipynb files
  • 🎯 Customize quiz difficulty: Easy, Medium, or Hard
  • ❓ Choose question types: Multiple Choice (MCQ) or Fill-in-the-Blank
  • 🧠 Generate quiz questions using sentence-transformers
  • πŸ“₯ Export generated quizzes as a downloadable .docx file
  • βš™οΈ Progress bar and retry logic for robust question generation
  • πŸ’‘ Tips section for better document preparation

πŸ–ΌοΈ Screenshot

image

πŸ› οΈ Tech Stack

  • Python 3.10+
  • Streamlit – UI Framework
  • sentence-transformers – Semantic embedding model
  • pdfminer.six – PDF text extraction
  • pypandoc – File format conversion
  • python-docx – Word document handling
  • dotenv – For managing API keys (if applicable)

πŸ“‚ Folder Structure

TheQuizLab/
β”‚

β”œβ”€β”€ main.py # Main Streamlit app

β”œβ”€β”€ quiz_engine.py # Handles question generation logic

β”œβ”€β”€ doc_processor.py # Handles file reading & conversion

β”œβ”€β”€ requirements.txt

└── README.md


πŸ§ͺ How to Run

  1. Clone this repository

git clone https://github.com/your-username/TheQuizLab.git
cd TheQuizLab

  1. Install dependencies

pip install -r requirements.txt

3. Run the app

streamlit run main.py
πŸ“ Note: For PDF, CSV, and notebook file uploads, Pandoc must be installed on your system.


🧠 How it Works

The user uploads a document.
The app extracts clean text and uses a pre-trained SentenceTransformer model to understand and generate quiz-style questions.
You choose difficulty level and type (MCQ or Fill-in-the-blank).
The app returns a list of questions with answers, and you can download it as a Word document.

🧾License
MIT License. Feel free to modify and use for educational or personal projects.

πŸ™Œ Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

πŸ‘¨β€πŸ’» Author
Faithfulness Issijude and Toochi Uduma

v0.3.3[beta]