Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -104,8 +104,12 @@ def launch_gradio_widget(metric):
|
|
104 |
(feature_names, feature_types) = zip(*metric.features.items())
|
105 |
gradio_input_types = infer_gradio_input_types(feature_types)
|
106 |
|
107 |
-
def compute(
|
108 |
-
|
|
|
|
|
|
|
|
|
109 |
# return metric.compute(**parse_gradio_data(data, gradio_input_types))
|
110 |
|
111 |
iface = gr.Interface(
|
|
|
104 |
(feature_names, feature_types) = zip(*metric.features.items())
|
105 |
gradio_input_types = infer_gradio_input_types(feature_types)
|
106 |
|
107 |
+
def compute(prediction, reference):
|
108 |
+
data = {
|
109 |
+
"predictions": [prediction],
|
110 |
+
"references":[reference]
|
111 |
+
}
|
112 |
+
return metric.compute(data)
|
113 |
# return metric.compute(**parse_gradio_data(data, gradio_input_types))
|
114 |
|
115 |
iface = gr.Interface(
|