Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.14.0
metadata
title: Exam Simulator
emoji: ⚡
colorFrom: indigo
colorTo: gray
sdk: gradio
sdk_version: 5.45.0
app_file: app.py
pinned: false
SPM Exam Simulator (local PDF → JSON → SQLite → Simulator)
This repo provides:
ocr_agent.py— PDF → JSON (extracts text + images).merge_questions.py— merge processed JSONs intoquestions.jsonand populateexam.db.app.py— Gradio-based Paper 2 (MCQ) simulator that shows questions + diagrams, lets students select A/B/C/D, and reveals score + AI advice after submission.agents.py— Analyzer & Coach (ZhipuAI) wrappers.
Quick overview
- Put your PDFs under a local folder (recommended:
data/raw/<subject>/<year>/paper2.pdf). - Run OCR to produce processed JSONs.
- Run
merge_questions.pyto createquestions.jsonand populateexam.db. - Start the simulator:
python app.py.
Requirements
- Python 3.10+ (the Docker image used Python 3.10)
- Install Tesseract OCR (system binary).
- Windows: download and install [Tesseract for Windows] (e.g. from UB Mannheim)
- Linux (Debian/Ubuntu):
sudo apt-get install tesseract-ocr - macOS:
brew install tesseract
- Install Python packages:
python -m pip install -r requirements.txt