This Streamlit application allows users to upload a PDF file, extract multiple-choice questions (MCQs) from the content, and output the extracted MCQs into a CSV file.
- Upload PDF files.
- Extract text from PDFs.
- Generate MCQs based on the extracted text.
- Download the generated MCQs in a CSV format.
mcq_generator/ |-- app.py |-- mcq_extractor.py |-- requirements.txt |-- README.md
- Streamlit
- Pandas
- PyMuPDF
- Langchain
- Python-dotenv
-
Clone the repository: git clone [(https://github.com/Ganlak/mcqgenerator.git)]
-
Navigate to the project directory: cd mcq_generator
-
Install the required packages: pip install -r requirements.txt
- Create a
.envfile in the project directory and add your OpenAI API key: OPENAI_API_KEY=your_openai_api_key - Run the Streamlit app: streamlit run app.py
- Upload a PDF file.
- Enter the number of MCQs, subject, and tone.
- Click on "Generate Quiz" to extract MCQs and download the CSV file.