File size: 2,169 Bytes
156dddf
 
 
 
876d6c8
156dddf
928a8de
156dddf
 
17cc328
156dddf
 
d25fb87
5b46cad
d25fb87
 
 
 
 
 
 
 
ef5c937
 
 
 
d25fb87
 
20c453a
d25fb87
 
 
 
 
ef5c937
 
 
d25fb87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: Maya  Klinik Sehat Sentosa (Role‑Play)
emoji: 🩺
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: "4.44.1"
app_file: app.py
pinned: false
hf_oauth: true
---

Maya – Klinik Sehat Sentosa (Role‑Play)

Overview
- Gradio app where students interview “Maya,” a clinic owner persona, to practice requirements elicitation for an appointment & queueing system.
- “Generate Requirements JSON” creates a structured summary from the chat transcript. No data is persisted.

Run Locally
1. Python 3.9+
2. Install deps:
   pip install -r requirements.txt
3. (Optional) Model selection (default uses GPT‑OSS via Together):
   export HF_MODEL=openai/gpt-oss-20b
   # If using GPT‑OSS/Together, set provider key:
   export TOGETHER_API_KEY=xxxxxxxxxxxxxxxx
4. Start the app:
   python app.py
5. Click “Sign in” to grant the app an access token for the Hugging Face Inference API.

Deploy on Hugging Face Spaces
1. Create a new Space (SDK: Gradio).
2. Add files (app.py, requirements.txt, README.md). Push via Git.
3. Users click “Sign in” to authorize Inference API use.
4. (Optional) Set Space Variables:
   - `HF_MODEL` (e.g., `openai/gpt-oss-20b`)
   - `TOGETHER_API_KEY` (required for GPT‑OSS via Together)

Persona & Scope
- Persona: Maya is friendly, busy, non‑technical; answers concretely; asks clarifying questions when prompts are vague.
- Scope: scheduling, queue order, reminders, daily counts only. No billing, insurance, or EMR details.
- Constraints: low digital literacy, intermittent internet, must run on existing Android phones, small budget.

Usage Tips
- Ask clear, specific questions (who, what, when, where, how, constraints, edge cases).
- Click “Generate Requirements JSON” to see a structured summary of established requirements.
- JSON fields: actors, goals, constraints, functional & non‑functional requirements, user stories, edge cases, assumptions, open questions, acceptance criteria.

Notes
- Uses Hugging Face Inference (`huggingface_hub.InferenceClient`) with streaming responses.
- No database — state is in memory per session.
- If the JSON fails to parse, the raw text is shown instead.