Spaces:
Sleeping
Sleeping
Akis Giannoukos
commited on
Commit
·
1cbe677
1
Parent(s):
d044724
Refactor summary headers in patient and clinician summaries
Browse files
app.py
CHANGED
|
@@ -304,7 +304,7 @@ def build_patient_summary(chat_history: List[Tuple[str, str]], meta: Dict[str, A
|
|
| 304 |
total = meta.get("Total_Score") or display_json.get("Total_Score")
|
| 305 |
transcript_text = transcript_to_text(chat_history)
|
| 306 |
return (
|
| 307 |
-
"
|
| 308 |
"Thank you for your time. The clinician will review your conversation and follow up with you. \n\nHere is a copy of our conversation so you can review it later.\n\n"
|
| 309 |
f"```\n{transcript_text}\n```"
|
| 310 |
)
|
|
@@ -320,10 +320,10 @@ def build_clinician_summary(chat_history: List[Tuple[str, str]], meta: Dict[str,
|
|
| 320 |
scores_lines = "\n".join([f"- {k}: {v}" for k, v in scores.items()])
|
| 321 |
conf_str = ", ".join([f"{c:.2f}" for c in confidences]) if confidences else ""
|
| 322 |
return (
|
| 323 |
-
"
|
| 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```"
|
|
|
|
| 304 |
total = meta.get("Total_Score") or display_json.get("Total_Score")
|
| 305 |
transcript_text = transcript_to_text(chat_history)
|
| 306 |
return (
|
| 307 |
+
"# Summary for Patient\n\n"
|
| 308 |
"Thank you for your time. The clinician will review your conversation and follow up with you. \n\nHere is a copy of our conversation so you can review it later.\n\n"
|
| 309 |
f"```\n{transcript_text}\n```"
|
| 310 |
)
|
|
|
|
| 320 |
scores_lines = "\n".join([f"- {k}: {v}" for k, v in scores.items()])
|
| 321 |
conf_str = ", ".join([f"{c:.2f}" for c in confidences]) if confidences else ""
|
| 322 |
return (
|
| 323 |
+
"# Summary for Clinician\n\n"
|
| 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```"
|