Update README.md
Browse files
README.md
CHANGED
@@ -128,10 +128,10 @@ def predict(
|
|
128 |
predictions.extend(summaries)
|
129 |
with open(predictions_file, "w") as w:
|
130 |
for p in predictions:
|
131 |
-
w.write(p.strip() + "\n")
|
132 |
with open(targets_file, "w") as w:
|
133 |
for t in targets:
|
134 |
-
w.write(t.strip() + "\n")
|
135 |
|
136 |
predict("IlyaGusev/mbart_ru_sum_gazeta", "gazeta_test.jsonl", "predictions.txt", "targets.txt")
|
137 |
```
|
|
|
128 |
predictions.extend(summaries)
|
129 |
with open(predictions_file, "w") as w:
|
130 |
for p in predictions:
|
131 |
+
w.write(p.strip().replace("\n", " ") + "\n")
|
132 |
with open(targets_file, "w") as w:
|
133 |
for t in targets:
|
134 |
+
w.write(t.strip().replace("\n", " ") + "\n")
|
135 |
|
136 |
predict("IlyaGusev/mbart_ru_sum_gazeta", "gazeta_test.jsonl", "predictions.txt", "targets.txt")
|
137 |
```
|