Commit
·
17aca3c
1
Parent(s):
69c7720
Trim output
Browse files
app.py
CHANGED
@@ -65,6 +65,7 @@ PLAN: This section outlines the next steps in the patient's care, including trea
|
|
65 |
# Decode and extract the response part
|
66 |
response = tokenizer.batch_decode(outputs)[0]
|
67 |
soap_note = response.split("### Response:")[1].strip() if "### Response:" in response else response
|
|
|
68 |
|
69 |
return soap_note
|
70 |
|
|
|
65 |
# Decode and extract the response part
|
66 |
response = tokenizer.batch_decode(outputs)[0]
|
67 |
soap_note = response.split("### Response:")[1].strip() if "### Response:" in response else response
|
68 |
+
soap_note = soap_note.replace("<|end▁of▁sentence|>", "").strip()
|
69 |
|
70 |
return soap_note
|
71 |
|