BenchmarkBot commited on
Commit
f208a6d
β€’
1 Parent(s): ce249f3

fix conditions

Browse files
Files changed (1) hide show
  1. app.py +19 -16
app.py CHANGED
@@ -68,18 +68,24 @@ def change_tab(query_param):
68
 
69
  def submit_query(single_df, multi_df, text, backends, datatypes, threshold):
70
 
 
 
 
 
 
 
71
  filtered_single = single_df[
72
  single_df["Model πŸ€—"].str.contains(text) &
73
  single_df["Backend 🏭"].isin(backends) &
74
  single_df["Datatype πŸ“₯"].isin(datatypes) &
75
- single_df["Average H4 Score ⬆️"] >= threshold
76
  ]
77
 
78
  filtered_multi = multi_df[
79
  multi_df["Model πŸ€—"].str.contains(text) &
80
  multi_df["Backend 🏭"].isin(backends) &
81
  multi_df["Datatype πŸ“₯"].isin(datatypes) &
82
- multi_df["Average H4 Score ⬆️"] >= threshold
83
  ]
84
 
85
  return filtered_single, filtered_multi
@@ -92,13 +98,11 @@ with demo:
92
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
93
 
94
  with gr.Row():
95
- with gr.Box(elem_id="search-bar-box"):
96
- search_bar = gr.Textbox(
97
- label="Search πŸ”Ž",
98
- info="Search for a model and press Submit πŸš€",
99
- elem_id="search-bar",
100
- )
101
-
102
  backend_checkboxes = gr.CheckboxGroup(
103
  choices=["pytorch", "onnxruntime"],
104
  value=["pytorch"],
@@ -115,13 +119,12 @@ with demo:
115
  )
116
 
117
  with gr.Row():
118
- with gr.Box(elem_id="threshold-slider-box"):
119
- threshold_slider = gr.Slider(
120
- label="H4 Threshold πŸ“ˆ",
121
- info="Filter by average H4 score",
122
- value=0.0,
123
- elem_id="threshold-slider",
124
- )
125
 
126
  with gr.Row():
127
  submit_button = gr.Button(
 
68
 
69
  def submit_query(single_df, multi_df, text, backends, datatypes, threshold):
70
 
71
+ print("submit_query")
72
+ print(text)
73
+ print(backends)
74
+ print(datatypes)
75
+ print(threshold)
76
+
77
  filtered_single = single_df[
78
  single_df["Model πŸ€—"].str.contains(text) &
79
  single_df["Backend 🏭"].isin(backends) &
80
  single_df["Datatype πŸ“₯"].isin(datatypes) &
81
+ (single_df["Average H4 Score ⬆️"] >= threshold)
82
  ]
83
 
84
  filtered_multi = multi_df[
85
  multi_df["Model πŸ€—"].str.contains(text) &
86
  multi_df["Backend 🏭"].isin(backends) &
87
  multi_df["Datatype πŸ“₯"].isin(datatypes) &
88
+ (multi_df["Average H4 Score ⬆️"] >= threshold)
89
  ]
90
 
91
  return filtered_single, filtered_multi
 
98
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
99
 
100
  with gr.Row():
101
+ search_bar = gr.Textbox(
102
+ label="Search πŸ”Ž",
103
+ info="Search for a model and press Submit πŸš€",
104
+ elem_id="search-bar",
105
+ )
 
 
106
  backend_checkboxes = gr.CheckboxGroup(
107
  choices=["pytorch", "onnxruntime"],
108
  value=["pytorch"],
 
119
  )
120
 
121
  with gr.Row():
122
+ threshold_slider = gr.Slider(
123
+ label="H4 Threshold πŸ“ˆ",
124
+ info="Filter by average H4 score",
125
+ value=0.0,
126
+ elem_id="threshold-slider",
127
+ )
 
128
 
129
  with gr.Row():
130
  submit_button = gr.Button(