AI-assisted stress and trauma assessment for India's National Helpline Against Atrocities (14566). Reads reports in five Indian languages, scores danger and stress separately, escalates to a human whe
HealthPython · JavaScriptGitHub @maimunaafrah341-makerOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
AI-assisted stress and trauma assessment for India's National Helpline Against Atrocities (14566). Reads reports in five Indian languages, scores danger and stress separately, escalates to a human when unsure, and cites law only from retrieved Acts. SIH26093, Team HEXACORES.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
AI-based real-time stress and trauma assessment for victims/complainants accessing a national helpline.
Built for SIH26093 (Ministry of Social Justice and Empowerment): a real-time module that assesses the psychological stress, trauma, fear, and vulnerability of a caller at first contact with the National Helpline Against Atrocities (14566), and routes them to the right human response instead of leaving triage to whoever happens to answer.Read the full README ↗AI-based real-time stress and trauma assessment for victims/complainants accessing a national helpline.
Built for SIH26093 (Ministry of Social Justice and Empowerment): a real-time module that assesses the psychological stress, trauma, fear, and vulnerability of a caller at first contact with the National Helpline Against Atrocities (14566), and routes them to the right human response instead of leaving triage to whoever happens to answer.
Core philosophy: UNDERSTAND → VERIFY → ACT → ESCALATE. Athena is not a chatbot that always has an answer. It's a pipeline that knows what it doesn't know, and hands a case to a human the moment it's uncertain rather than guessing.
🎥 Watch the demo (2 min): a Hindi voice report going through the full pipeline: sent for human review when Athena isn't confident, emergency numbers offered before anything is dialled, the counsellor's case brief with the signals behind the assessment, and the privacy-protected risk map.
🌐 Live prototype: the WhatsApp-style demo at
/, the counsellor dashboard at/dashboard.html. Anyone can file a report. The counsellor pages need an access key because they show case data: SIH evaluators will find a direct dashboard link in the submission PDF, and the demo video walks through those pages for everyone else.
One report, five languages. While building Athena we scored the same caste-atrocity report in five languages. English and Hindi came back Low; Telugu, Bengali and Urdu came back Critical. The two languages a caller is most likely to use gave the safest-sounding answer. The bug is fixed, and that report is now a regression test in all five languages.
The reporter's side. A Hindi report in the WhatsApp-style demo. The reply comes back in Hindi, marked High risk, and the case is flagged for a counsellor. The strip under the header says plainly that this is not an emergency service.
The counsellor's side. The Overview puts the Critical and High cases nobody has reviewed yet at the top, each with a button to open it.
eval_pipeline.py).geocoding.py resolves an approximate district-level pin (OSM Nominatim, with a cached/offline table for common districts) instead of the case simply not appearing, clearly labeled "(approx.)" rather than implying GPS precision it doesn't have.risk_tier: Low/Moderate/High/Critical, the four categories SIH26093 names) from detected signals (threats, injury, immediate danger, caste-based motive, and a hostile crowd gathered outside the home), with a concrete per-tier response protocol (SLA, escalation route, action).voice_features.py/librosa, not placeholder values) into a Low/Moderate/High/Critical tier, and flagging when text and voice disagree. Also detects depression indicators and social isolation, both named by the problem statement and both feeding the stress index rather than the risk tier, because they describe how vulnerable someone is rather than whether they are about to be hurt. Social isolation does double duty: social boycott is an SC/ST Act offence, not just a mood. INTAKE ── text ── voice ── photo ── SOS ────────────────────────────┐
(portal · WhatsApp-style channel · 14566 · IVRS · mobile) │
▼
voice_service.py → Whisper transcript
ocr.py → text extracted from a photo
voice_features.py → pitch variance · pause ratio · speech rate
│
▼
UNDERSTAND understanding.py → language · script · incident type · signals
(semantic, not keywords; romanized included)
│
┌──────────────────────┴───────────────┐
▼ ▼
ASSESS risk.py svi.py
risk_tier + response_protocol Stress Vulnerability Index
(SLA · route · action) TEXT ⊕ VOICE fusion
+ explainability, + divergence
└──────────────────────┬───────────────┘
▼
VERIFY retrieval.py → ChromaDB over ingested BNS / SC-ST Act / PWDVA
kg.py → applicable provisions + district escalation contact
── confidence gate: below threshold, do not answer ──
│
▼
ACT response_engine.py → grounded reply, evidence-only, crisis-safe filtered
emergency_contacts.py → real helplines by tier (KIRAN on high stress)
translation.py → English for the counsellor · reply back in-language
│
▼
ESCALATE pipeline.py → escalate on ANY of: Critical risk · Critical stress
· low understanding confidence ("escalate when unsure")
cases.py → case record + append-only timeline
nhaa.py → NHAA docket bound to channel + outcome
│
▼
COUNSELLOR dashboard → prioritised alerts · case brief · acknowledge · escalate
risk map → k-anonymised: areas under 3 reports are withheld
Full request/response contract, known limitations, and field-level detail: API_CONTRACT.md.
| Layer | Used |
|---|---|
| API server | FastAPI + uvicorn |
| Language/incident understanding | intfloat/multilingual-e5-small (sentence-transformers) |
| Knowledge retrieval | ChromaDB |
| Response generation | Groq (primary), Google Gemini, then OpenRouter: an ordered cross-provider fallback so one provider's outage/quota can't take generation down |
| Legal knowledge graph | networkx.DiGraph |
| Voice transcription | Groq-hosted Whisper (whisper-large-v3-turbo, primary), falling back to OpenAI Whisper (whisper-1) |
| Evidence OCR | EasyOCR |
| Frontend | Static HTML/CSS/JS (web/dashboard.html), plus a WhatsApp-style demo channel calling the same /report endpoint |
web/index.html is a real channel, not a mockup with canned replies: typing, recording a voice note, or sending a photo there hits the same /report, /report/voice, and /report/image endpoints the dashboard uses, and the case it creates shows up in the counsellor dashboard like any other. It exists to show that the same pipeline works inside an interface a first-time user already trusts.
Real WhatsApp is live too. whatsapp.py + POST /whatsapp/webhook run the same pipeline from an actual WhatsApp message via the Twilio sandbox (text, voice notes and photos), with the request signature verified before anything is processed, so the endpoint cannot be used to inject cases. A voice note is transcribed, assessed and answered inside the webhook itself; measured at ~2s on the live deployment.
Two ways to send voice, deliberately: the mic button records live from the browser (with a timer, and a clear message rather than a silent failure if permission is denied or there's no device), and a separate button sends a bundled Hindi sample, a guaranteed-good clip to fall back on when a stage mic or a noisy room won't cooperate mid-demo.
pytest -q # 265 tests, ~3min (the embedding model dominates)
pytest tests/test_i18n.py -q # 40 of them, 0.3s, no model or database
Every test encodes a defect this project actually shipped, not a hypothetical (the six added on 2026-09-18 are the exception: they come from reading SIH26093's requirement list back against the routing table and finding medical assistance and witness protection named nowhere), and the sentences in them are the ones that found each bug, deliberately not the example anchors added to fix it. A test that reuses its own anchor proves the anchor exists, not that the fix generalises.
| File | Guards |
|---|---|
tests/test_understanding.py | Caste motive firing in all five languages and clearing the 80% floor kg.py needs before attaching SC/ST provisions; caste reports not typing as domestic violence and routing to the wrong Act; a death threat not reading as suicidal ideation while genuine ideation still does; anonymous attackers not being downgraded; native Urdu and Bengali reported as native script |
tests/test_api.py | Every admin endpoint refusing a missing or wrong key; the follow-up token being per-case and one-shot; empty reports rejected while SOS with no text is not; map pins carrying nothing that identifies a reporter |
tests/test_i18n.py | Every translation key present in all five languages, no key referenced but undefined, no value left as untranslated English, and no hardcoded English heading in the case brief. Also covers the demo page's own UI_STRINGS table, which imports nothing and so was invisible to all of the above, and forbids any label or error message written in English by JavaScript, the gap that put an English verdict under a Hindi reply. Also stops the caste playbook telling counsellors that SC/ST provisions attach automatically, when kg.py attaches them only above the 80% floor |
tests/test_response_prompt.py | The prompt naming the statute actually in force, forbidding the evidence markers and the repealed penal code, and asking for plain text and one numeral system; markdown stripped from replies and from translations, without touching a statute citation |
tests/test_ocr.py | A photo reader for every supported language, because a missing one silently fell back to English and read nothing in an Urdu or Bengali screenshot; each reader being one script plus English; a WhatsApp photo being read in the script of its caption |
tests/test_risk.py | Tier vocabulary matching the problem statement; contact counts rising with severity; High and Critical routing the medical aid and witness protection SIH26093 asks for, and the lower tiers not promising protection they should not |
tests/test_retrieval.py | Retrieval well-formed and ordered, every evaluation query clearing the confidence gate including the non-English ones, and the SC/ST Act reachable from a caste query |
tests/conftest.py points the database at a temp file first, so running the suite cannot
file test reports into a database a counsellor is looking at.
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
copy env.example .env # then fill in your real keys
python app.py # or: uvicorn app:app --reload
Required in .env: ADMIN_API_KEY, GROQ_API_KEY (primary for both response generation and voice transcription). Optional: GEMINI_API_KEY/OPENROUTER_API_KEY (generation fallback tiers), OPENAI_API_KEY (voice transcription fallback). Voice transcription falls back to a placeholder transcript only if both Groq and OpenAI are unset/unavailable. See env.example for details on each.
With the server running, open:
http://localhost:8000/: the WhatsApp-style citizen-facing demohttp://localhost:8000/dashboard.html: the report form + counsellor dashboard. The report form and confirmation are open to anyone; ADMIN_API_KEY gates the counsellor pages (Overview, Cases, Risk Map, Guidance, Alerts), and the key is verified against the server before the gate opens rather than any string being accepted.Stated honestly rather than discovered by a judge mid-demo. Full detail is in API_CONTRACT.md's Known Limitations section.
demo_audio/caste_harassment_hindi.ogg), not a placeholder.voice_features.py) are disabled on the hosted deployment. Measured at ~20s and ~800MB on top of the embedding model, which is enough to get a memory-capped container killed mid-request. Set ENABLE_VOICE_FEATURES=1 where the RAM exists; without it, voice notes still transcribe, assess, escalate and reply, on the transcript alone, so the SVI runs text-only.| Name | Focus |
|---|---|
| Maimuna | Team lead · RAG, AI pipeline & backend: understanding, risk, SVI, knowledge graph, retrieval |
| Yusra | Backend / API integration: voice transcription integration, endpoint testing |
| Sadaf | Frontend: UI/UX, report flow, safety map |
| Samreen | Multilingual & voice: audio input pipeline |
| Saboora | Deployment / DevOps: infrastructure and hosting |
| Nuvaira | Pitch & problem research: problem-statement grounding, presentation |
nhaa.py), channel-agnostic across 14566 voice, IVRS, the Integrated Portal, chatbot, and mobile app, so the same pipeline runs no matter which of NHAA's real entry points a report came through, and every finalized case gets a docket ID the same way a real NHAA complaint does.translation.py). Both directions are labelled machine translation with the original always shown; nothing is auto-sent.seed_data.py), as insurance against an ephemeral host wiping storage on redeploy, and it never touches or overwrites real report data.risk.py's response protocol is routing metadata describing the intended real-world action. Athena does not call ERSS-112 itself, and no screen tells a reporter that help has been dispatched.