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