Spaces:
Runtime error
Runtime error
Gagan Bhatia commited on
Commit ·
ab10bc6
1
Parent(s): bf6e21d
Update model.py
Browse files- src/models/model.py +7 -0
src/models/model.py
CHANGED
|
@@ -461,3 +461,10 @@ class Summarization:
|
|
| 461 |
input_text = test_df['input_text']
|
| 462 |
references = test_df['output_text']
|
| 463 |
predictions = [self.predict(x) for x in input_text]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 461 |
input_text = test_df['input_text']
|
| 462 |
references = test_df['output_text']
|
| 463 |
predictions = [self.predict(x) for x in input_text]
|
| 464 |
+
|
| 465 |
+
results = metric.compute(predictions=predictions, references=references)
|
| 466 |
+
|
| 467 |
+
output = {
|
| 468 |
+
'Rouge 1': {
|
| 469 |
+
'Rouge_1 Low Precision': results["rouge1"].low.precision,
|
| 470 |
+
'Rouge_1 Low recall': results["rouge1"].low.recall,
|