ruslanmv commited on
Commit
3720f41
1 Parent(s): 9524054

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
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
- #answer = response_text.split('<|im_start|>assistant')[-1].strip()
34
- start_idx = response_text.find("<|im_start|>assistant")
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