ZeroCommand commited on
Commit
107357d
1 Parent(s): 6de1a1d

fix dropdown choices pd list

Browse files
app_text_classification.py CHANGED
@@ -81,7 +81,6 @@ def get_demo():
81
  column_mappings.append(gr.Dropdown(visible=False))
82
 
83
  with gr.Accordion(label="Model Wrap Advance Config", open=True):
84
- run_local = gr.Checkbox(value=False, label="Run with Local Model Inference (pipeline)")
85
  run_inference = gr.Checkbox(value=True, label="Run with Inference API")
86
  inference_token = gr.Textbox(
87
  value="",
@@ -89,6 +88,8 @@ def get_demo():
89
  visible=True,
90
  interactive=True,
91
  )
 
 
92
 
93
  with gr.Accordion(label="Scanner Advance Config (optional)", open=False):
94
  scanners = gr.CheckboxGroup(label="Scan Settings", visible=True)
 
81
  column_mappings.append(gr.Dropdown(visible=False))
82
 
83
  with gr.Accordion(label="Model Wrap Advance Config", open=True):
 
84
  run_inference = gr.Checkbox(value=True, label="Run with Inference API")
85
  inference_token = gr.Textbox(
86
  value="",
 
88
  visible=True,
89
  interactive=True,
90
  )
91
+ run_local = gr.Checkbox(value=False, label="Run Locally with Pipeline [Slow]")
92
+
93
 
94
  with gr.Accordion(label="Scanner Advance Config (optional)", open=False):
95
  scanners = gr.CheckboxGroup(label="Scan Settings", visible=True)
text_classification_ui_helpers.py CHANGED
@@ -47,9 +47,10 @@ def get_related_datasets_from_leaderboard(model_id):
47
  records = leaderboard.records
48
  model_records = records[records["model_id"] == model_id]
49
  datasets_unique = model_records["dataset_id"].unique()
50
- all_unique_datasets = records["dataset_id"].unique()
51
  if len(datasets_unique) == 0:
52
- return gr.update(choices=all_unique_datasets)
 
 
53
  return gr.update(choices=datasets_unique, value=datasets_unique[0])
54
 
55
 
 
47
  records = leaderboard.records
48
  model_records = records[records["model_id"] == model_id]
49
  datasets_unique = model_records["dataset_id"].unique()
 
50
  if len(datasets_unique) == 0:
51
+ all_unique_datasets = list(records["dataset_id"].unique())
52
+ print(type(all_unique_datasets), all_unique_datasets)
53
+ return gr.update(choices=all_unique_datasets, value="")
54
  return gr.update(choices=datasets_unique, value=datasets_unique[0])
55
 
56