The Gemma 4 Good Hackathon

The Gemma 4 Good Hackathon · Impact Track · Future of Education prize

CodeBuddy

Built by Adinda Panca Mochamad

A Python tutor prototype with photo-to-code, restricted execution, and prompts for five Indonesian languages. We reviewed the code without running it; spoken output uses a cloud service, and handwriting accuracy is unmeasured.

I also participated in this hackathon with Memory Moment. This coverage was prepared independently after results were announced.

The idea worth stealing

Meet the student where the code already is: on paper.

The builder describes Indonesian students learning Python on paper without regular access to computers. CodeBuddy accepts a photograph. Gemma 4 vision transcribes the handwriting, RestrictedPython executes it, and the tutor explains the missing colon in Javanese, Sundanese, Minangkabau, Batak, or Indonesian. The model never touches execution and the sandbox never touches the model, and the text workflow is designed for one school machine through Ollama; speech output still needs the cloud.

What we checked

Date checked: .

Public repository at the submission revision, Kaggle writeup, and linked artifacts; code was read, not executed. Deployment checks and limits are described below.

Labels apply to each finding and the evidence described, not to the project as a whole.

Not independently verified means the available evidence was insufficient to confirm a claim. It does not mean the claim is false.

  1. Student code runs in RestrictedPython, never in the model

    Verified

    The tutor executes code first through compile_restricted with a five-second timeout, an 8,000-character input cap, and a 5,000-character output cap, then hands the error to Gemma. Model output is never executed. Source

  2. Five languages, by prompt

    Verified

    Indonesian, Javanese Krama, Sundanese, Minang, and Batak Toba are five instruction strings the server prepends. The 55-example Unsloth dataset and notebook exist, but the app runs base gemma4:e4b. Source

  3. Offline, except the voice back

    Verified

    Speech in uses faster-whisper on CPU; speech out uses edge-tts, which is Microsoft’s cloud. The writeup says so, and text mode works without it. Source

Under the hood

E4B, not E2B
Config and README point at gemma4:e4b for both text and vision, with 10 GB of RAM recommended; the .env example still names gemma3:4b.
Demo mode fills the inputs, not the outputs
The Try Demo button loads a sample notebook photo and a for-loop missing its colon, then calls the same OCR and tutor endpoints a real student would.

Nuance

The repository has four commits, the last a single “production release”, and 132 test functions we did not run. PaddleOCR is a lazy-loaded fallback, and Gemma vision reading a child’s handwriting is shown in the video, not measured. Nothing is deployed; localhost through Docker Compose is the documented path.