ruslanmv commited on
Commit
a6ddd2a
1 Parent(s): 248a751

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -32,11 +32,9 @@ def askme(symptoms, question):
32
  outputs = model.generate(**inputs, max_new_tokens=200, use_cache=True)
33
  response_text = tokenizer.batch_decode(outputs)[0].strip()
34
  # Remove system messages and content
35
- response_text = response_text.replace(sys_message, "").replace(content, "").strip()
36
  # Extract only the assistant's response
37
- assistant_response = response_text.split("assistant")[1].strip()
38
-
39
- return assistant_response
40
 
41
  # Example usage
42
  symptoms = '''\
 
32
  outputs = model.generate(**inputs, max_new_tokens=200, use_cache=True)
33
  response_text = tokenizer.batch_decode(outputs)[0].strip()
34
  # Remove system messages and content
35
+ #response_text = response_text.replace(sys_message, "").replace(content, "").strip()
36
  # Extract only the assistant's response
37
+ return response_text
 
 
38
 
39
  # Example usage
40
  symptoms = '''\