Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.5.1
metadata
title: Gemini + Claude Distractor Generator
emoji: 🧠
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 4.26.0
app_file: app.py
pinned: false
Gemini + Claude Distractor Generator
This is a web app that uses Gemini 1.5 Flash (Free Tier) to generate multiple-choice distractors and then uses Claude 3.5 Sonnet (via OpenRouter) to rank the distractors based on how confusing they are.
Features
- Generates distractors using Gemini 1.5 Flash
- Uses Claude Sonnet 3.5 to evaluate and rank distractors (LLM-as-Judge)
- Displays the correct answer, distractors, and Claude's ranking
- Simple and clean Gradio UI
Files
app.py: Main Gradio application logicrequirements.txt: DependenciesREADME.md: This file
How to Run
Locally
Install dependencies:
pip install -r requirements.txtSet your API keys inside
app.py:- Gemini API key (for generation)
- OpenRouter API key (for ranking via Claude)
Run:
python app.pyOpen the Gradio link shown in your terminal.
On Hugging Face Spaces
- Upload
app.py,requirements.txt, andREADME.md - Choose
Gradioas the SDK - Make sure to set your Gemini API key and OpenRouter API key via HF secrets or hardcode for testing
- Set
app.pyas your main file (app_file)
Notes
- Claude is used only to rank distractors; Gemini handles generation.
- Free-tier Gemini is slower and limited — ranking may take longer due to OpenRouter limits.