Spaces:
Runtime error
Runtime error
metadata
title: Gemini Distractor Generator
emoji: 🧠
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 4.26.0
app_file: app.py
pinned: false
Gemini Distractor Generator
This is a simple web app that uses Gemini 1.5 Flash (via Gemini API) to generate multiple-choice distractors for a given question. It automatically identifies the correct answer and returns three plausible distractors.
Features
- Uses Gemini 1.5 Flash (Free Tier) via API
- Auto-generates distractors based on question context
- Also attempts to identify the correct answer
- Includes minimal Gradio UI
Files
app.py: Main Gradio application.requirements.txt: Required Python libraries.README.md: This file.
How to Run
Locally
Install the dependencies:
pip install -r requirements.txtRun the app:
python app.pyVisit the local URL shown by Gradio.
On Hugging Face Spaces
- Upload all three files to your Hugging Face Space.
- Choose
Gradioas the SDK. - Make sure to set your Gemini API key in a secure way (e.g., using secrets or hardcoded for testing).
- Set
app.pyas the entry point.
Notes
- Gemini 1.5 Flash is selected to stay within free-tier quotas.
- You may need to set your API key inside
app.pymanually.