Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,10 +25,10 @@ for row in random_test_samples:
|
|
| 25 |
|
| 26 |
|
| 27 |
def predict(context, answer):
|
| 28 |
-
formatted =
|
| 29 |
|
| 30 |
if answer is not None:
|
| 31 |
-
formatted =
|
| 32 |
|
| 33 |
|
| 34 |
inputs = tokenizer(formatted, return_tensors="pt")
|
|
|
|
| 25 |
|
| 26 |
|
| 27 |
def predict(context, answer):
|
| 28 |
+
formatted = context.replace('\n', ' ') + "\n"
|
| 29 |
|
| 30 |
if answer is not None:
|
| 31 |
+
formatted = context.replace('\n', ' ') + "\n" + answer.replace('\n', ' ') + "\n"
|
| 32 |
|
| 33 |
|
| 34 |
inputs = tokenizer(formatted, return_tensors="pt")
|