Live Demo: nepalimcqgenerator.streamlit.app
A modern web app to generate high-quality, context-aware Nepali multiple-choice questions (MCQs) from any input text using Google Gemini 2.5. No fallback or hardcoded content—every MCQ is based on your actual input!
- Real-time MCQ Generation: Uses Gemini 2.5 for accurate, relevant questions
- Supports Any Subject: History, science, literature, etc.
- Beautiful Streamlit UI: Clean, mobile-friendly, and distraction-free
- No Fallbacks: No more generic or Nepal/Sagarmatha questions
- Easy Setup: Just add your Gemini API key
- Nepali Language: All MCQs and UI in Nepali
-
Clone the Repository
git clone https://github.com/yourusername/nepali-mcq-generator.git cd nepali-mcq-generator
-
Install Dependencies
pip install -r requirements.txt
-
Get Gemini API Key
- Go to Google AI Studio
- Sign in and create a new API key
-
Configure Environment
- Copy
.env.example
to.env
- Paste your API key:
GEMINI_API_KEY=your_actual_key_here
- Copy
-
Run the App
streamlit run app.py
- The app will open in your browser (default: http://localhost:8501)
- Paste or type any Nepali (or English) text
- Click 'Generate MCQs'
- Answer the questions and check your score!
mcq-generator/
├── app.py
├── requirements.txt
├── README.md
├── src/
│ ├── api/
│ │ └── openai_client.py
│ ├── ui_components.py
│ └── ...
└── images/
├── sample_home.png
└── sample_mcq.png
- No fallback logic: All MCQs are generated by Gemini 2.5
- No hardcoded answers: Correct answer is parsed from Gemini's output
- Easily extendable: Add more UI features or analytics as needed
MIT License. See LICENSE for details.