Spaces:
Build error
Build error
Refactor app.py to import test_cases instead of tests
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# from evaluate.utils import launch_gradio_widget
|
2 |
-
import
|
3 |
from evaluate.utils.logging import get_logger
|
4 |
from evaluate.utils import (
|
5 |
infer_gradio_input_types,
|
@@ -56,7 +56,7 @@ def launch_gradio_widget(metric, test_cases):
|
|
56 |
title=f"Metric: {metric.name}",
|
57 |
article=parse_readme(local_path / "README.md"),
|
58 |
# TODO: load test cases and use them to populate examples
|
59 |
-
examples=[parse_test_cases(test_cases, feature_names, gradio_input_types)],
|
60 |
)
|
61 |
|
62 |
iface.launch()
|
@@ -64,4 +64,4 @@ def launch_gradio_widget(metric, test_cases):
|
|
64 |
|
65 |
module = evaluate.load("danieldux/metric_template_1")
|
66 |
|
67 |
-
launch_gradio_widget(module,
|
|
|
1 |
# from evaluate.utils import launch_gradio_widget
|
2 |
+
from tests import test_cases
|
3 |
from evaluate.utils.logging import get_logger
|
4 |
from evaluate.utils import (
|
5 |
infer_gradio_input_types,
|
|
|
56 |
title=f"Metric: {metric.name}",
|
57 |
article=parse_readme(local_path / "README.md"),
|
58 |
# TODO: load test cases and use them to populate examples
|
59 |
+
examples=[[parse_test_cases(test_cases, feature_names, gradio_input_types)]],
|
60 |
)
|
61 |
|
62 |
iface.launch()
|
|
|
64 |
|
65 |
module = evaluate.load("danieldux/metric_template_1")
|
66 |
|
67 |
+
launch_gradio_widget(module, test_cases)
|