Samanvay

Different languages. One incident. The urgent report never disappears in the crowd.

A station-controller dashboard for metro complaints. It turns Gujarati, Hindi, English and Gujlish complaints into department queues and groups reports about the same asset. When new evidence shows danger, it raises the priority. It drafts acknowledgements in the passenger's language and syncs every record to a central receiver without duplicates. All AI inference runs locally through Ollama.

The moment it matters: three passengers report Lift L2 at Motera Stadium in three languages, and the incident sits at P3. A fourth message arrives in Gujlish: "andar ek vyakti fasaya chhe" ("someone is trapped inside").
Priority 3 → 5, routed to the safety queue, with the exact evidence quote shown to the controller.

How it works

Streamlit dashboard
  -> station.db (complaint + outbox event, saved before inference)
  -> local Ollama, JSON-schema structured output
  -> validation + hazard pre-screen + priority rules + incident grouping
  -> sync -> central receiver (FastAPI) -> ack by event_id

Measured on held-out cases

11 synthetic cases across four languages (smoke, entrapment, violence, negated smoke, prompt injection and more), run with gemma4:e2b on a GTX 1650 laptop.

MetricResult
Department correct10 / 11
False urgent (AI)0 / 8
Urgent recall (AI / keyword baseline)2/3 / 3/3. The AI's miss is flagged for review.
Incorrect merges0
Latency, warm (median)~6.5 s

Small smoke test with draft labels, not production validation. The data is synthetic; the station names are real and the asset IDs are fictional.

Run it

Samanvay runs on a station laptop with a local model, so this page describes it rather than hosting it.

pip install -r requirements.txt
ollama pull gemma4:e2b
python -m streamlit run ps07/app.py
python -m uvicorn ps07.receiver:app --port 8001

Source: github.com/tanvishdesai/MetroHack

Built for Metro Hacks: Midnight Edition (GDG Gandhinagar), problem statement PS-07. Built with Streamlit, FastAPI, Pydantic, SQLite and Ollama.