Skip to content

Fawzy-AI-Explorer/Quiz-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Quiz Generator πŸ“

License: MIT Python 3.11 CrewAI Streamlit App PyPDF2 LangChain AI Generated GitHub stars GitHub forks GitHub watchers GitHub

Generate intelligent quizzes from any PDF document using AI Agents

πŸš€ Try the Live App

A sophisticated quiz generation system that transforms PDF documents into educational assessments, leveraging AI agents to create high-quality multiple-choice and true/false questions with detailed explanations.

πŸ“‹ Introduction

Quiz Generator is an AI-powered application built using CrewAI that automatically creates educational quizzes from PDF documents. The system employs specialized AI agents working together to extract content, generate questions, and provide comprehensive answer explanations. Perfect for educators, content creators, and students looking to create assessment materials or test their understanding of technical content.

πŸŽ₯ Live Demo

demo.mp4

✨ Features

  • πŸ€– AI Agent-Powered: Utilizes specialized CrewAI agents for different aspects of quiz generation
  • πŸ“„ PDF Processing: Extracts and processes text from PDF documents
  • 🧠 Multiple Question Types: Generates both multiple-choice and true/false questions
  • πŸ“Š Quiz Analysis: Provides detailed explanations for correct and incorrect answers
  • πŸ” Quality Control: Ensures questions are relevant and pedagogically sound
  • πŸ–₯️ User-Friendly Interface: Clean Streamlit web interface for easy interaction
  • πŸ“± Responsive Design: Works across different screen sizes and devices

Project Structure

Quiz-Generator/
β”œβ”€β”€ __init__.py
β”œβ”€β”€ app.py                  # Streamlit web application
β”œβ”€β”€ requirements.txt        # Project dependencies
β”œβ”€β”€ .gitignore             # Git ignore file
β”œβ”€β”€ assets/                # Static assets
β”‚   └── live_demo.mkv      # Demo video
β”œβ”€β”€ config/                # Configuration files
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ agents.yaml        # Agent definitions
β”‚   β”œβ”€β”€ config.py          # Global settings
β”‚   └── tasks.yaml         # Task definitions
β”œβ”€β”€ data/                  # Sample PDF documents
β”œβ”€β”€ output/                 # Generated quiz JSON files
β”‚   β”œβ”€β”€ mcq_quiz.json       # Multiple-choice questions
β”‚   β”œβ”€β”€ quiz_analysis.json  # Detailed explanations
β”‚   └── tf_quiz.json        # True/false questions
β”œβ”€β”€ src/                   # Core application code
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ crew.py            # CrewAI agent setup
β”‚   β”œβ”€β”€ pydantic_models.py # Data models
β”‚   β”œβ”€β”€ quiz_pipeline.py   # Main processing pipeline
β”‚   └── utils.py           # Helper functions
β”œβ”€β”€ .devcontainer/         # Development container config
└── .vscode/              # VS Code settings

πŸš€ Installation

  1. Clone the repository

    git clone https://github.com/Fawzy-AI-Explorer/Quiz-Generator.git
    cd Quiz-Generator
  2. Set up a virtual environment

    python -m venv .venv
    # On Windows
    .\venv\Scripts\activate
    # On macOS/Linux
    source venv/Scripts/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Set up environment variables

    Create a .env file in the project root with:

    PROVIDER=your_llm_provider
    MODEL=your_model_name
    BASE_URL=your_base_url
    TEMPERATURE=0.7

πŸ’» Usage

  1. Start the Streamlit application

    streamlit run app.py
  2. Using the application

    • Upload a PDF document through the web interface
    • Click the "Generate Quiz" button
    • Review generated multiple-choice and true/false questions
    • Explore detailed explanations for each question
  3. Running the pipeline directly

    cd "Quiz generator"
    python -c "from src.quiz_pipeline import run_pipeline; run_pipeline('path/to/your/file.pdf')"

🀝 Contributing

Contributions are welcome and appreciated! Here's how you can contribute:

  1. Fork the repository

  2. Create a feature branch

    git checkout -b feature/amazing-feature
  3. Commit your changes

    git commit -m 'Add some amazing feature'
  4. Push to the branch

    git push origin feature/amazing-feature
  5. Open a Pull Request

Please ensure your code follows the project's coding style and includes appropriate tests.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Contributors

Thanks to all the amazing people who have contributed to this project!

πŸ™ Acknowledgments

  • CrewAI - Framework for orchestrating role-playing autonomous AI agents
  • Streamlit - Framework for building the web interface
  • LangChain - Framework for language model applications
  • PyPDF - Library for PDF processing

About

Quiz Generator App Using Agents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages