Spaces:
Sleeping
Sleeping
Akis Giannoukos
commited on
Commit
·
a7e392e
1
Parent(s):
1cbe677
Update summary text formatting and improve clarity in patient and clinician summaries
Browse files
app.py
CHANGED
|
@@ -305,7 +305,7 @@ def build_patient_summary(chat_history: List[Tuple[str, str]], meta: Dict[str, A
|
|
| 305 |
transcript_text = transcript_to_text(chat_history)
|
| 306 |
return (
|
| 307 |
"# Summary for Patient\n\n"
|
| 308 |
-
"
|
| 309 |
f"```\n{transcript_text}\n```"
|
| 310 |
)
|
| 311 |
|
|
@@ -324,8 +324,8 @@ def build_clinician_summary(chat_history: List[Tuple[str, str]], meta: Dict[str,
|
|
| 324 |
f"- Severity: **{severity}** \n"
|
| 325 |
f"- PHQ‑9 Total: **{total}** \n"
|
| 326 |
# f"- High Risk: **{risk}**\n\n"
|
| 327 |
-
f"
|
| 328 |
-
"
|
| 329 |
f"```\n{transcript_text}\n```"
|
| 330 |
)
|
| 331 |
|
|
@@ -614,8 +614,8 @@ def process_turn(
|
|
| 614 |
finished = True
|
| 615 |
elif done:
|
| 616 |
summary = (
|
| 617 |
-
|
| 618 |
-
"
|
| 619 |
)
|
| 620 |
chat_history[-1] = (chat_history[-1][0], summary)
|
| 621 |
finished = True
|
|
|
|
| 305 |
transcript_text = transcript_to_text(chat_history)
|
| 306 |
return (
|
| 307 |
"# Summary for Patient\n\n"
|
| 308 |
+
"### Conversation Transcript\n\n"
|
| 309 |
f"```\n{transcript_text}\n```"
|
| 310 |
)
|
| 311 |
|
|
|
|
| 324 |
f"- Severity: **{severity}** \n"
|
| 325 |
f"- PHQ‑9 Total: **{total}** \n"
|
| 326 |
# f"- High Risk: **{risk}**\n\n"
|
| 327 |
+
f"### Item Scores\n{scores_lines}\n\n"
|
| 328 |
+
"### Conversation Transcript\n\n"
|
| 329 |
f"```\n{transcript_text}\n```"
|
| 330 |
)
|
| 331 |
|
|
|
|
| 614 |
finished = True
|
| 615 |
elif done:
|
| 616 |
summary = (
|
| 617 |
+
"Thank you for your time. The clinician will review your conversation and follow up with you."
|
| 618 |
+
"Here is a copy of our conversation so you can review it later."
|
| 619 |
)
|
| 620 |
chat_history[-1] = (chat_history[-1][0], summary)
|
| 621 |
finished = True
|