Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

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:

http://127.0.0.1:5000/

๐Ÿงช 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages