Spaces:
Build error
Build error
Victoria Oberascher
commited on
Commit
·
4d9d4d0
1
Parent(s):
930c393
try to fix bug
Browse files- horizon-metrics.py +5 -0
horizon-metrics.py
CHANGED
@@ -14,6 +14,7 @@
|
|
14 |
|
15 |
import evaluate
|
16 |
import datasets
|
|
|
17 |
|
18 |
from seametrics.horizon.utils import *
|
19 |
|
@@ -175,6 +176,10 @@ class HorizonMetrics(evaluate.Metric):
|
|
175 |
Returns:
|
176 |
float: The computed horizon error.
|
177 |
"""
|
|
|
|
|
|
|
|
|
178 |
|
179 |
if (self.ground_truth_det is None or self.predictions is None):
|
180 |
self.ground_truth_det = references[0]
|
|
|
14 |
|
15 |
import evaluate
|
16 |
import datasets
|
17 |
+
import numpy as np
|
18 |
|
19 |
from seametrics.horizon.utils import *
|
20 |
|
|
|
176 |
Returns:
|
177 |
float: The computed horizon error.
|
178 |
"""
|
179 |
+
# this means that the metric was called using the input field on huggingface website
|
180 |
+
|
181 |
+
print(np.asarray(predictions).shape)
|
182 |
+
print(np.asarray(references).shape)
|
183 |
|
184 |
if (self.ground_truth_det is None or self.predictions is None):
|
185 |
self.ground_truth_det = references[0]
|