This Streamlit application helps students generate questions and answers from their study materials. Upload PDF documents or images, and the app will:
- Extract text from the documents
- Generate a summary using Google Gemini API
- Split the text into meaningful paragraphs
- Create practice questions and answers from selected paragraphs
- Python 3.8 or higher
- Google Gemini API key (required)
- Clone the repository
- Install required packages:
pip install -r requirements.txt
- Create a
.env
file in the root directory with your Gemini API key:GEMINI_API_KEY=your_gemini_api_key_here MODEL=gemini-pro
Start the Streamlit app:
streamlit run app.py
The app will be available at http://localhost:8501
app.py
: Streamlit application with integrated Gemini API callsfile_processing.py
: Handles PDF and image text extractiongemini_utils.py
: Utility functions for interacting with the Gemini API.env
: Contains your Gemini API key (not included in repository)
- PDF document processing
- Image OCR using Tesseract
- Text summarization using Google Gemini AI
- Paragraph extraction
- Question and answer generation
- Interactive UI for practicing with generated questions
- Model selection (gemini-pro or gemini-pro-vision)
- Streamlit: Web UI
- Google Generative AI API: AI processing
- PyPDF2: PDF processing
- Tesseract OCR: Image text extraction
- Pillow: Image handling