MCQ Generator with Streamlit is a web application that allows users to upload PDF or text files, specify the number of questions, subject, and tone, and generate multiple-choice questions (MCQs) based on the provided input. The application utilizes OpenAI's language models for natural language processing and provides feedback on the complexity of the generated quiz.
- File Upload: Users can upload PDF or text files containing the text from which MCQs will be generated.
- Dynamic Inputs: Users can specify the number of questions, subject, and tone for the generated MCQs.
- Real-time Feedback: Provides real-time feedback on the complexity of the generated quiz and suggests improvements.
- Tabular Display: Displays the generated MCQs in a tabular format for easy readability.
- Python 3.x
- Streamlit library
- Langchain library
- OpenAI API Key
-
Clone the repository:
git clone https://github.com/your-username/mcq-generator-streamlit.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables:
-
Create a
.env
file in the root directory. -
Add your OpenAI API key to the
.env
file:OPEN_AI_KEY=your-openai-api-key
-
-
Install the local package in the virtual environment:
python setup.py install
-
Run the Streamlit application:
streamlit run main.py
-
Access the application in your web browser.
-
Upload a PDF or text file, specify the number of questions, subject, and tone, and click the "Create MCQs" button.
-
View the generated MCQs and the review feedback provided.
- All logs are stored in the
logs
directory. - Each log file is named with a timestamp indicating when it was created.