An AI-powered Multiple Choice Question (MCQ) generator that creates questions from URLs or uploaded files (PDF, Word, Text).
- Generate MCQs from:
- Web URLs
- PDF files
- Word documents (.doc, .docx)
- Text files
- Multiple difficulty levels:
- Easy
- Medium
- Hard
- Very Hard
- Interactive quiz interface with:
- Real-time progress tracking
- Timer
- Question navigation
- Answer review
- Detailed results with:
- Score calculation
- Time taken
- Correct/incorrect answers
- PDF download option
- Password protection to prevent abuse
- Responsive design
- Backend: Flask (Python)
- Frontend: HTML, CSS, JavaScript
- AI: Google's Gemini Pro API
- PDF Generation: jsPDF
- Styling: Bootstrap 5
- Deployment: Render
- Python 3.11.7
- Google Gemini API key
- Modern web browser
- Clone the repository:
git clone <your-repo-url>
cd mcq-generator- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp example.env .envEdit .env file and add:
- Your Gemini API key
- Master password for question generation
Run the application:
python app.pyAccess at: http://localhost:8000
- Push code to GitHub:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin <your-repo-url>
git push -u origin main- On Render:
- Create new Web Service
- Connect GitHub repository
- Configure build settings:
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app
- Build Command:
- Add environment variables:
GEMINI_API_KEYMASTER_PASSWORD
- Deploy
- Access the web interface
- Choose input method (URL or file upload)
- Set number of questions and difficulty level
- Enter master password
- Generate questions
- Start the quiz
- Complete the test
- Review results and download PDF
- Master password protection
- Secure file handling
- Session management
- Input validation
- Error handling
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Create Pull Request
MIT License
For support or questions, please open an issue on GitHub.