Wendgan commited on
Commit
c9bca7c
·
verified ·
1 Parent(s): bfe83c1

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Gemini Distractor Generator
3
+ emoji: 🧠
4
+ colorFrom: indigo
5
+ colorTo: pink
6
+ sdk: gradio
7
+ sdk_version: "4.26.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+
13
+ # Gemini Distractor Generator
14
+
15
+ 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.
16
+
17
+ ## Features
18
+ - Uses Gemini 1.5 Flash (Free Tier) via API
19
+ - Auto-generates distractors based on question context
20
+ - Also attempts to identify the correct answer
21
+ - Includes minimal Gradio UI
22
+
23
+ ## Files
24
+ - `app.py`: Main Gradio application.
25
+ - `requirements.txt`: Required Python libraries.
26
+ - `README.md`: This file.
27
+
28
+ ## How to Run
29
+
30
+ ### Locally
31
+ 1. Install the dependencies:
32
+ ```bash
33
+ pip install -r requirements.txt
34
+ ```
35
+
36
+ 2. Run the app:
37
+ ```bash
38
+ python app.py
39
+ ```
40
+
41
+ 3. Visit the local URL shown by Gradio.
42
+
43
+ ### On Hugging Face Spaces
44
+ 1. Upload all three files to your Hugging Face Space.
45
+ 2. Choose `Gradio` as the SDK.
46
+ 3. Make sure to set your Gemini API key in a secure way (e.g., using secrets or hardcoded for testing).
47
+ 4. Set `app.py` as the entry point.
48
+
49
+ ## Notes
50
+ - Gemini 1.5 Flash is selected to stay within free-tier quotas.
51
+ - You may need to set your API key inside `app.py` manually.