Wendgan's picture
Upload README.md
c9bca7c verified
|
raw
history blame
1.31 kB
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

  1. Install the dependencies:

    pip install -r requirements.txt
    
  2. Run the app:

    python app.py
    
  3. Visit the local URL shown by Gradio.

On Hugging Face Spaces

  1. Upload all three files to your Hugging Face Space.
  2. Choose Gradio as the SDK.
  3. Make sure to set your Gemini API key in a secure way (e.g., using secrets or hardcoded for testing).
  4. Set app.py as 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.py manually.