AI Important Questions Generator (PDF โ Exam Focus)
This is a Flask-based AI project that takes a PDF question bank and automatically generates the most important exam questions using Google Gemini AI.
Upload your PDF, choose how many important questions you want, and let AI do the hard work for you.
๐ Features
Upload any Question Bank PDF
Extracts text using PyPDF2
Uses Google Gemini AI to select important questions
Custom number of questions (20, 50, etc.)
Clean API endpoint for frontend usage
Fast & lightweight Flask backend
๐ง Tech Stack
Backend: Flask, Python
AI Model: Google Gemini (gemini-2.5-flash)
PDF Parsing: PyPDF2
Environment Config: python-dotenv
Frontend: HTML/CSS (Your UI files)
๐ Project Structure project/ โ โโโ app.py โโโ .env โโโ uploads/ โ โโโ temp.pdf โโโ templates/ โ โโโ index.html โ โโโ result.html
๐ Setup Instructions
Install dependencies:
pip install flask python-dotenv PyPDF2 google-generativeai
Create a .env file:
GEMINI_API_KEY=your_api_key_here
Run the app:
python app.py
Open browser:
๐งช How It Works
User uploads a PDF
Flask saves it as uploads/temp.pdf
Text is extracted from PDF
A prompt is created for Gemini
Gemini selects the most important questions
Questions are returned as JSON
๐ API Endpoint
POST /api/important-questions
Response:
{ "important_questions": "1. Question...\n2. Question...\n3. Question..." }
๐ฏ Use Case
Perfect for:
Exam preparation
Notes making
Competitive exams
Quick syllabus revision
๐จโ๐ป Built By
Naveen โ Student Developer from Hubli ๐ฎ๐ณ Frontend: HTML, CSS (Tailwind), JS, React Backend: Node.js, Express, Flask DB: Firebase, MongoDB