Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,14 +25,14 @@ random_test_samples = dataset["test"].select(random.sample(range(0, len(dataset[
|
|
| 25 |
|
| 26 |
examples = []
|
| 27 |
for row in random_test_samples:
|
| 28 |
-
examples.append([row['support'],
|
| 29 |
examples.append([row['support'], row['correct_answer']])
|
| 30 |
|
| 31 |
|
| 32 |
-
def predict(context, answer):
|
| 33 |
formatted = context.replace('\n', ' ') + "\n"
|
| 34 |
|
| 35 |
-
if answer is not
|
| 36 |
formatted = context.replace('\n', ' ') + "\n" + answer.replace('\n', ' ') + "\n"
|
| 37 |
|
| 38 |
|
|
|
|
| 25 |
|
| 26 |
examples = []
|
| 27 |
for row in random_test_samples:
|
| 28 |
+
examples.append([row['support'], ""])
|
| 29 |
examples.append([row['support'], row['correct_answer']])
|
| 30 |
|
| 31 |
|
| 32 |
+
def predict(context = "", answer = ""):
|
| 33 |
formatted = context.replace('\n', ' ') + "\n"
|
| 34 |
|
| 35 |
+
if answer is not "":
|
| 36 |
formatted = context.replace('\n', ' ') + "\n" + answer.replace('\n', ' ') + "\n"
|
| 37 |
|
| 38 |
|