ruslanmv commited on
Commit
3579d89
1 Parent(s): acb60b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -31,7 +31,10 @@ def askme(symptoms, question):
31
  inputs = tokenizer(prompt, return_tensors="pt").to(device) # Ensure inputs are on CUDA device
32
  outputs = model.generate(**inputs, max_new_tokens=200, use_cache=True)
33
  response_text = tokenizer.batch_decode(outputs)[0].strip()
34
- return answer
 
 
 
35
 
36
  # Example usage
37
  symptoms = '''\
 
31
  inputs = tokenizer(prompt, return_tensors="pt").to(device) # Ensure inputs are on CUDA device
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
+
37
+ return response_text
38
 
39
  # Example usage
40
  symptoms = '''\