Frontend → Backend (PC) → Firestore “jobs” → Colab worker (GPU LLM) → Firestore → Backend → Frontend.
The backend no longer runs a local LLM. Instead, it creates a job document in Firestore and waits for a Colab worker (running the GPU model) to process it and write back results.
FIREBASE_PROJECT_ID=smart-assessor-fdeaaGOOGLE_APPLICATION_CREDENTIALS=<path to service-account.json>pip install google-cloud-firestore google-authPOST /upload/assessment — Accepts a PDF, extracts text, splits into chunks, enqueues a Firestore job, waits for result, and returns { evaluation: string }.POST /grade-text — Smoke test; sends a single text as one job.ALLOWED_ORIGINS.Run locally:
pip install -r backend/requirements.txt
uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000
_llm.chat(text) returning a JSON-first line.status="queued", processes chunks or student_text, then writes back status="done" + result.text.POST /upload/assessment and renders evaluation.VITE_API_BASE (build time)window.API_BASE (runtime; frontend/public/config.js)localStorage.setItem('API_BASE', 'http(s)://...')GOOGLE_APPLICATION_CREDENTIALS there).32 commits
12 commits
Jupyter Notebook
92.3%
Python
6.1%
JavaScript
1.1%
Frontend → Backend (PC) → Firestore “jobs” → Colab worker (GPU LLM) → Firestore → Backend → Frontend.
The backend no longer runs a local LLM. Instead, it creates a job document in Firestore and waits for a Colab worker (running the GPU model) to process it and write back results.
FIREBASE_PROJECT_ID=smart-assessor-fdeaaGOOGLE_APPLICATION_CREDENTIALS=<path to service-account.json>pip install google-cloud-firestore google-authPOST /upload/assessment — Accepts a PDF, extracts text, splits into chunks, enqueues a Firestore job, waits for result, and returns { evaluation: string }.POST /grade-text — Smoke test; sends a single text as one job.ALLOWED_ORIGINS.Run locally:
pip install -r backend/requirements.txt
uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000
_llm.chat(text) returning a JSON-first line.status="queued", processes chunks or student_text, then writes back status="done" + result.text.POST /upload/assessment and renders evaluation.VITE_API_BASE (build time)window.API_BASE (runtime; frontend/public/config.js)localStorage.setItem('API_BASE', 'http(s)://...')GOOGLE_APPLICATION_CREDENTIALS there).32 commits
12 commits
Jupyter Notebook
92.3%
Python
6.1%
JavaScript
1.1%