yilunzhao commited on
Commit
f1c1530
1 Parent(s): 5c4c078

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,8 @@ def generate_response(passage: str, question: str) -> str:
22
  response = model.generate(**inputs, max_new_tokens=100)
23
 
24
  response = tokenizer.batch_decode(response, skip_special_tokens=True)[0]
25
-
 
26
 
27
  return response
28
 
 
22
  response = model.generate(**inputs, max_new_tokens=100)
23
 
24
  response = tokenizer.batch_decode(response, skip_special_tokens=True)[0]
25
+
26
+ response = response[len(message[0]):].strip().split('\n')[0]
27
 
28
  return response
29