Benny-Tang commited on
Commit
06c5ee2
·
verified ·
1 Parent(s): 03ce300

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -16
README.md CHANGED
@@ -9,22 +9,30 @@ app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- # 📝 SPM Exam Simulator
13
-
14
- An AI-powered simulator for **Form 5 SPM students**, covering **2018–2024 past papers**.
15
-
16
- ## Features
17
- - Upload past papers (PDF) Extracts questions with OCR
18
- - Handles **Paper 1 (Essay)** separately for practice with AI feedback
19
- - ✅ **Paper 2 (MCQ Simulator)** with auto-scoring + predicted questions
20
- - AI Agents:
21
- - **AnalyzerAgent** scores answers
22
- - **CoachAgent** essay feedback
23
- - **PredictiveAgent** forecasts 2025–2026 trends
24
- - Ignores empty JSON files safely
25
-
26
- ## Subjects
27
- - Core: BM, English, Math, History, Science, MoralStudies
 
 
 
 
 
 
 
 
28
 
29
 
30
 
 
9
  pinned: false
10
  ---
11
 
12
+ # SPM Exam Simulator (local PDF → JSON → SQLite → Simulator)
13
+
14
+ This repo provides:
15
+ - `ocr_agent.py` — PDF → JSON (extracts text + images).
16
+ - `merge_questions.py` — merge processed JSONs into `questions.json` and populate `exam.db`.
17
+ - `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.
18
+ - `agents.py` Analyzer & Coach (ZhipuAI) wrappers.
19
+
20
+ ## Quick overview
21
+ 1. Put your PDFs under a local folder (recommended: `data/raw/<subject>/<year>/paper2.pdf`).
22
+ 2. Run OCR to produce processed JSONs.
23
+ 3. Run `merge_questions.py` to create `questions.json` and populate `exam.db`.
24
+ 4. Start the simulator: `python app.py`.
25
+
26
+ ## Requirements
27
+ - Python 3.10+ (the Docker image used Python 3.10)
28
+ - Install Tesseract OCR (system binary).
29
+ - **Windows**: download and install [Tesseract for Windows] (e.g. from UB Mannheim)
30
+ - **Linux (Debian/Ubuntu)**: `sudo apt-get install tesseract-ocr`
31
+ - **macOS**: `brew install tesseract`
32
+ - Install Python packages:
33
+ ```bash
34
+ python -m pip install -r requirements.txt
35
+
36
 
37
 
38