Spaces:
Runtime error
Runtime error
Add Organization column to all tables with filters
Browse files
app.py
CHANGED
|
@@ -7,6 +7,11 @@ CLASSIFICATION_DATA = {
|
|
| 7 |
"ResNet-50", "ViT-Base", "Swin-T", "InceptionV3", "SqueezeNet",
|
| 8 |
"ResNet-50", "ViT-Base", "Swin-T", "InceptionV3", "SqueezeNet",
|
| 9 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"Dataset": [
|
| 11 |
"DoMars16", "DoMars16", "DoMars16", "DoMars16", "DoMars16",
|
| 12 |
"Atmospheric Dust", "Atmospheric Dust", "Atmospheric Dust", "Atmospheric Dust", "Atmospheric Dust",
|
|
@@ -30,6 +35,11 @@ DETECTION_DATA = {
|
|
| 30 |
"Faster R-CNN", "YOLOv5", "DETR", "RetinaNet", "SSD",
|
| 31 |
"Faster R-CNN", "YOLOv5", "DETR", "RetinaNet", "SSD",
|
| 32 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
"Dataset": [
|
| 34 |
"Mars Crater", "Mars Crater", "Mars Crater", "Mars Crater", "Mars Crater",
|
| 35 |
"Rover Component", "Rover Component", "Rover Component", "Rover Component", "Rover Component",
|
|
@@ -53,6 +63,11 @@ SEGMENTATION_DATA = {
|
|
| 53 |
"U-Net", "DeepLabV3+", "Mask R-CNN", "SegFormer", "HRNet",
|
| 54 |
"U-Net", "DeepLabV3+", "Mask R-CNN", "SegFormer", "HRNet",
|
| 55 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
"Dataset": [
|
| 57 |
"Mars Terrain", "Mars Terrain", "Mars Terrain", "Mars Terrain", "Mars Terrain",
|
| 58 |
"Dust Storm", "Dust Storm", "Dust Storm", "Dust Storm", "Dust Storm",
|
|
@@ -71,7 +86,7 @@ SEGMENTATION_DATA = {
|
|
| 71 |
}
|
| 72 |
|
| 73 |
|
| 74 |
-
def filter_and_search(df, search, datasets, models, columns):
|
| 75 |
filtered = df.copy()
|
| 76 |
|
| 77 |
if search:
|
|
@@ -82,6 +97,8 @@ def filter_and_search(df, search, datasets, models, columns):
|
|
| 82 |
filtered = filtered[filtered["Dataset"].isin(datasets)]
|
| 83 |
if models:
|
| 84 |
filtered = filtered[filtered["Model"].isin(models)]
|
|
|
|
|
|
|
| 85 |
|
| 86 |
if columns:
|
| 87 |
display_cols = [col for col in columns if col in filtered.columns]
|
|
@@ -94,8 +111,9 @@ def build_tab(data, name):
|
|
| 94 |
df = pd.DataFrame(data)
|
| 95 |
datasets = sorted(df["Dataset"].unique().tolist())
|
| 96 |
models = sorted(df["Model"].unique().tolist())
|
| 97 |
-
|
| 98 |
-
|
|
|
|
| 99 |
|
| 100 |
with gr.TabItem(name, elem_id="llm-benchmark-tab-table"):
|
| 101 |
with gr.Row():
|
|
@@ -129,6 +147,14 @@ def build_tab(data, name):
|
|
| 129 |
elem_classes="filter-group"
|
| 130 |
)
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
gr.Markdown("**Datasets**")
|
| 133 |
dataset_filter = gr.CheckboxGroup(
|
| 134 |
choices=datasets,
|
|
@@ -137,13 +163,14 @@ def build_tab(data, name):
|
|
| 137 |
elem_classes="filter-group"
|
| 138 |
)
|
| 139 |
|
| 140 |
-
def update(search, ds, md, cols):
|
| 141 |
-
return filter_and_search(df, search, ds, md, cols)
|
| 142 |
|
| 143 |
-
search_bar.change(update, [search_bar, dataset_filter, model_filter, col_selector], table)
|
| 144 |
-
dataset_filter.change(update, [search_bar, dataset_filter, model_filter, col_selector], table)
|
| 145 |
-
model_filter.change(update, [search_bar, dataset_filter, model_filter, col_selector], table)
|
| 146 |
-
|
|
|
|
| 147 |
|
| 148 |
|
| 149 |
custom_css = """
|
|
|
|
| 7 |
"ResNet-50", "ViT-Base", "Swin-T", "InceptionV3", "SqueezeNet",
|
| 8 |
"ResNet-50", "ViT-Base", "Swin-T", "InceptionV3", "SqueezeNet",
|
| 9 |
],
|
| 10 |
+
"Organization": [
|
| 11 |
+
"Microsoft", "Google", "Microsoft", "Google", "DeepMind",
|
| 12 |
+
"Microsoft", "Google", "Microsoft", "Google", "DeepMind",
|
| 13 |
+
"Microsoft", "Google", "Microsoft", "Google", "DeepMind",
|
| 14 |
+
],
|
| 15 |
"Dataset": [
|
| 16 |
"DoMars16", "DoMars16", "DoMars16", "DoMars16", "DoMars16",
|
| 17 |
"Atmospheric Dust", "Atmospheric Dust", "Atmospheric Dust", "Atmospheric Dust", "Atmospheric Dust",
|
|
|
|
| 35 |
"Faster R-CNN", "YOLOv5", "DETR", "RetinaNet", "SSD",
|
| 36 |
"Faster R-CNN", "YOLOv5", "DETR", "RetinaNet", "SSD",
|
| 37 |
],
|
| 38 |
+
"Organization": [
|
| 39 |
+
"Meta", "Ultralytics", "Meta", "Meta", "Google",
|
| 40 |
+
"Meta", "Ultralytics", "Meta", "Meta", "Google",
|
| 41 |
+
"Meta", "Ultralytics", "Meta", "Meta", "Google",
|
| 42 |
+
],
|
| 43 |
"Dataset": [
|
| 44 |
"Mars Crater", "Mars Crater", "Mars Crater", "Mars Crater", "Mars Crater",
|
| 45 |
"Rover Component", "Rover Component", "Rover Component", "Rover Component", "Rover Component",
|
|
|
|
| 63 |
"U-Net", "DeepLabV3+", "Mask R-CNN", "SegFormer", "HRNet",
|
| 64 |
"U-Net", "DeepLabV3+", "Mask R-CNN", "SegFormer", "HRNet",
|
| 65 |
],
|
| 66 |
+
"Organization": [
|
| 67 |
+
"OpenAI", "Google", "Meta", "NVIDIA", "Microsoft",
|
| 68 |
+
"OpenAI", "Google", "Meta", "NVIDIA", "Microsoft",
|
| 69 |
+
"OpenAI", "Google", "Meta", "NVIDIA", "Microsoft",
|
| 70 |
+
],
|
| 71 |
"Dataset": [
|
| 72 |
"Mars Terrain", "Mars Terrain", "Mars Terrain", "Mars Terrain", "Mars Terrain",
|
| 73 |
"Dust Storm", "Dust Storm", "Dust Storm", "Dust Storm", "Dust Storm",
|
|
|
|
| 86 |
}
|
| 87 |
|
| 88 |
|
| 89 |
+
def filter_and_search(df, search, datasets, models, organizations, columns):
|
| 90 |
filtered = df.copy()
|
| 91 |
|
| 92 |
if search:
|
|
|
|
| 97 |
filtered = filtered[filtered["Dataset"].isin(datasets)]
|
| 98 |
if models:
|
| 99 |
filtered = filtered[filtered["Model"].isin(models)]
|
| 100 |
+
if organizations:
|
| 101 |
+
filtered = filtered[filtered["Organization"].isin(organizations)]
|
| 102 |
|
| 103 |
if columns:
|
| 104 |
display_cols = [col for col in columns if col in filtered.columns]
|
|
|
|
| 111 |
df = pd.DataFrame(data)
|
| 112 |
datasets = sorted(df["Dataset"].unique().tolist())
|
| 113 |
models = sorted(df["Model"].unique().tolist())
|
| 114 |
+
organizations = sorted(df["Organization"].unique().tolist())
|
| 115 |
+
metric_cols = [col for col in df.columns if col not in ["Model", "Organization", "Dataset"]]
|
| 116 |
+
all_cols = ["Model", "Organization", "Dataset"] + metric_cols
|
| 117 |
|
| 118 |
with gr.TabItem(name, elem_id="llm-benchmark-tab-table"):
|
| 119 |
with gr.Row():
|
|
|
|
| 147 |
elem_classes="filter-group"
|
| 148 |
)
|
| 149 |
|
| 150 |
+
gr.Markdown("**Organizations**")
|
| 151 |
+
org_filter = gr.CheckboxGroup(
|
| 152 |
+
choices=organizations,
|
| 153 |
+
value=organizations,
|
| 154 |
+
label="",
|
| 155 |
+
elem_classes="filter-group"
|
| 156 |
+
)
|
| 157 |
+
|
| 158 |
gr.Markdown("**Datasets**")
|
| 159 |
dataset_filter = gr.CheckboxGroup(
|
| 160 |
choices=datasets,
|
|
|
|
| 163 |
elem_classes="filter-group"
|
| 164 |
)
|
| 165 |
|
| 166 |
+
def update(search, ds, md, org, cols):
|
| 167 |
+
return filter_and_search(df, search, ds, md, org, cols)
|
| 168 |
|
| 169 |
+
search_bar.change(update, [search_bar, dataset_filter, model_filter, org_filter, col_selector], table)
|
| 170 |
+
dataset_filter.change(update, [search_bar, dataset_filter, model_filter, org_filter, col_selector], table)
|
| 171 |
+
model_filter.change(update, [search_bar, dataset_filter, model_filter, org_filter, col_selector], table)
|
| 172 |
+
org_filter.change(update, [search_bar, dataset_filter, model_filter, org_filter, col_selector], table)
|
| 173 |
+
col_selector.change(update, [search_bar, dataset_filter, model_filter, org_filter, col_selector], table)
|
| 174 |
|
| 175 |
|
| 176 |
custom_css = """
|