This repo is a Cloud Run–ready demonstration of QuizGen with multiple quiz styles, up to 20 questions, file upload support (.txt, .docx, .pdf), and multiple quiz variations for selection.
- Paste text or upload a .txt/.docx/.pdf file.
- Choose number of questions (1–20), quiz style, and how many variations (1–5).
- Click Generate to receive multiple quiz versions to choose from.
This demo uses a local heuristic generator. For the hackathon AI Studio category, replace generate_quiz_variation in app.py with an AI Studio/Gemini call and parse the structured JSON returned.
- Ensure billing enabled and project set.
- Build & push:
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/quizgen_full - Deploy:
gcloud run deploy quizgen --image gcr.io/YOUR_PROJECT_ID/quizgen_full --allow-unauthenticated --region us-central1
- PDF support requires
pdfplumber; DOCX requirespython-docx. Both are in requirements.txt. - To integrate with Gemini/AI Studio, call your model(s) inside
generate_quiz_variationand parse the structured JSON.