Spaces:
Build error
Build error
Victoria Oberascher
commited on
Commit
·
625ed8e
1
Parent(s):
30e5c39
disable gradio widget
Browse files- app.py +1 -1
- horizon-metrics.py +0 -13
app.py
CHANGED
@@ -2,4 +2,4 @@ import evaluate
|
|
2 |
from evaluate.utils import launch_gradio_widget
|
3 |
|
4 |
module = evaluate.load("SEA-AI/horizon-metrics")
|
5 |
-
launch_gradio_widget(module)
|
|
|
2 |
from evaluate.utils import launch_gradio_widget
|
3 |
|
4 |
module = evaluate.load("SEA-AI/horizon-metrics")
|
5 |
+
#launch_gradio_widget(module)
|
horizon-metrics.py
CHANGED
@@ -176,19 +176,6 @@ class HorizonMetrics(evaluate.Metric):
|
|
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 |
-
try:
|
182 |
-
if len(np.asarray(predictions).shape) == 4 and len(
|
183 |
-
np.asarray(references).shape) == 4:
|
184 |
-
self.ground_truth_det = references[0]
|
185 |
-
self.predictions = predictions[0]
|
186 |
-
print(self.ground_truth_det)
|
187 |
-
print(self.predictions)
|
188 |
-
except:
|
189 |
-
# no nothing
|
190 |
-
print("do nothing")
|
191 |
-
pass
|
192 |
|
193 |
# calculate erros and store values in slope_error_list and midpoint_error_list
|
194 |
for annotated_horizon, proposed_horizon in zip(self.ground_truth_det,
|
|
|
176 |
Returns:
|
177 |
float: The computed horizon error.
|
178 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
|
180 |
# calculate erros and store values in slope_error_list and midpoint_error_list
|
181 |
for annotated_horizon, proposed_horizon in zip(self.ground_truth_det,
|