Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,20 +71,21 @@ with block:
|
|
| 71 |
leaderboard_metric_selector = gr.CheckboxGroup(
|
| 72 |
choices=metric_names, label="Select Metrics for Leaderboard", value=metric_names, interactive=True
|
| 73 |
)
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
| 88 |
|
| 89 |
# Update leaderboard when method/metric selection changes
|
| 90 |
leaderboard_method_selector.change(
|
|
@@ -99,23 +100,30 @@ with block:
|
|
| 99 |
)
|
| 100 |
|
| 101 |
with gr.Row(variant='panel', show_progress=True):
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
# Button to draw the plot for the selected benchmark
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
# Update selectors when benchmark type changes
|
| 121 |
benchmark_type_selector.change(
|
|
|
|
| 71 |
leaderboard_metric_selector = gr.CheckboxGroup(
|
| 72 |
choices=metric_names, label="Select Metrics for Leaderboard", value=metric_names, interactive=True
|
| 73 |
)
|
| 74 |
+
|
| 75 |
+
with gr.Row():
|
| 76 |
+
# Display the filtered leaderboard
|
| 77 |
+
baseline_value = get_baseline_df(method_names, metric_names)
|
| 78 |
+
baseline_header = ["method_name"] + metric_names
|
| 79 |
+
baseline_datatype = ['markdown'] + ['number'] * len(metric_names)
|
| 80 |
+
|
| 81 |
+
data_component = gr.components.Dataframe(
|
| 82 |
+
value=baseline_value,
|
| 83 |
+
headers=baseline_header,
|
| 84 |
+
type="pandas",
|
| 85 |
+
datatype=baseline_datatype,
|
| 86 |
+
interactive=False,
|
| 87 |
+
visible=True,
|
| 88 |
+
)
|
| 89 |
|
| 90 |
# Update leaderboard when method/metric selection changes
|
| 91 |
leaderboard_method_selector.change(
|
|
|
|
| 100 |
)
|
| 101 |
|
| 102 |
with gr.Row(variant='panel', show_progress=True):
|
| 103 |
+
|
| 104 |
+
with gr.Row():
|
| 105 |
+
# Dropdown for benchmark type
|
| 106 |
+
benchmark_type_selector = gr.Dropdown(choices=list(benchmark_specific_metrics.keys()), label="Select Benchmark Type")
|
| 107 |
+
|
| 108 |
+
with gr.Row()
|
| 109 |
+
# Dynamic selectors
|
| 110 |
+
x_metric_selector = gr.Dropdown(choices=[], label="Select X-axis Metric", visible=False)
|
| 111 |
+
y_metric_selector = gr.Dropdown(choices=[], label="Select Y-axis Metric", visible=False)
|
| 112 |
+
aspect_type_selector = gr.Dropdown(choices=[], label="Select Aspect Type", visible=False)
|
| 113 |
+
dataset_type_selector = gr.Dropdown(choices=[], label="Select Dataset Type", visible=False)
|
| 114 |
+
dataset_selector = gr.Dropdown(choices=[], label="Select Dataset", visible=False)
|
| 115 |
+
single_metric_selector = gr.Dropdown(choices=[], label="Select Metric", visible=False)
|
| 116 |
+
|
| 117 |
+
with gr.Row():
|
| 118 |
+
# CheckboxGroup for methods
|
| 119 |
+
method_selector = gr.CheckboxGroup(choices=method_names, label="Select methods to visualize", interactive=True, value=method_names)
|
| 120 |
|
| 121 |
# Button to draw the plot for the selected benchmark
|
| 122 |
+
with gr.Row():
|
| 123 |
+
plot_button = gr.Button("Plot")
|
| 124 |
+
|
| 125 |
+
with gr.Row():
|
| 126 |
+
plot_output = gr.Image(label="Plot")
|
| 127 |
|
| 128 |
# Update selectors when benchmark type changes
|
| 129 |
benchmark_type_selector.change(
|