Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
|