MCQ Generator is a Python application that utilizes the Hugging Face API and the Mixtral model to generate multiple-choice questions (MCQs) based on text input. The application is designed to simplify the process of creating quizzes or assessments by automatically generating questions of varying difficulty levels.
- Generates MCQs based on text input (TXT or PDF files)
- Allows selection of question difficulty levels: Simple, Medium, or Tough
- Utilizes the Hugging Face API for natural language processing
- Powered by the Mixtral model for advanced language understanding and generation
Mixtral is a state-of-the-art language model developed by Mistral AI. It's known for its:
- High performance across a wide range of tasks
- Efficient processing of long contexts
- Ability to generate coherent and contextually relevant content
By leveraging Mixtral, our MCQ Generator can create high-quality, diverse, and contextually accurate questions.
- Python 3.6+
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/yourusername/mcq-generator.git cd mcq-generator
-
Set up a virtual environment (optional but recommended):
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Run setup:
python setup.py install
-
Start the Streamlit application:
streamlit run streamlitapp.py
-
Open your web browser and go to the provided local host URL.
- Upload a text file (TXT) or a PDF document containing the content for which MCQs need to be generated.
- Select the desired number of questions and their difficulty level (Simple, Medium, or Tough).
- Click on the "Generate Questions" button to
mcq-gen-demo.1.mp4
obtain the generated MCQs.
Contributions are welcome! Please fork the repository and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.