Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,12 +30,8 @@ def askme(symptoms, question):
|
|
30 |
# Remove system messages and content
|
31 |
# Extract and return the generated text, removing the prompt
|
32 |
# Extract only the assistant's response
|
33 |
-
|
34 |
-
|
35 |
-
end_idx = response_text.find("<|im_end|>", start_idx)
|
36 |
-
assistant_response = response_text[start_idx + len("<|im_start|>assistant"):end_idx]
|
37 |
-
|
38 |
-
return assistant_response.split(". ")[0]
|
39 |
|
40 |
|
41 |
|
|
|
30 |
# Remove system messages and content
|
31 |
# Extract and return the generated text, removing the prompt
|
32 |
# Extract only the assistant's response
|
33 |
+
answer = response_text.split('<|im_start|>assistant')[-1].strip()
|
34 |
+
return answer
|
|
|
|
|
|
|
|
|
35 |
|
36 |
|
37 |
|