davanstrien HF staff commited on
Commit
f560023
1 Parent(s): 3003b62

feat: Add allow_custom_value option to base_model dropdown

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -49,7 +49,6 @@ df = pd.DataFrame(
49
  df_with_org = df.copy(deep=True)
50
  pipeline_tags = [x.pipeline_tag for x in models_with_base_model_info]
51
  # sort pipeline tags alphabetically
52
- pipeline_tags = sorted(pipeline_tags)
53
  unique_pipeline_tags = list(
54
  {x.pipeline_tag for x in models_with_base_model_info if x.pipeline_tag is not None}
55
  )
@@ -74,7 +73,7 @@ df_with_org = df_with_org.dropna(subset=["org"])
74
  grouped_by_base_model = groupby(
75
  lambda x: x.cardData.get("base_model"), models_with_base_model_info
76
  )
77
-
78
  all_base_models = df["base_model"].to_list()
79
 
80
 
@@ -178,7 +177,7 @@ with gr.Blocks() as demo:
178
 
179
  gr.Markdown(produce_summary())
180
  gr.Markdown("## Find all models trained from a base model")
181
- base_model = gr.Dropdown(all_base_models, label="Base Model")
182
  results = gr.Markdown()
183
  base_model.change(return_models_for_base_model, base_model, results)
184
  gr.Markdown("## Base model rankings ")
 
49
  df_with_org = df.copy(deep=True)
50
  pipeline_tags = [x.pipeline_tag for x in models_with_base_model_info]
51
  # sort pipeline tags alphabetically
 
52
  unique_pipeline_tags = list(
53
  {x.pipeline_tag for x in models_with_base_model_info if x.pipeline_tag is not None}
54
  )
 
73
  grouped_by_base_model = groupby(
74
  lambda x: x.cardData.get("base_model"), models_with_base_model_info
75
  )
76
+ print(df.columns)
77
  all_base_models = df["base_model"].to_list()
78
 
79
 
 
177
 
178
  gr.Markdown(produce_summary())
179
  gr.Markdown("## Find all models trained from a base model")
180
+ base_model = gr.Dropdown(all_base_models, label="Base Model",allow_custom_value=True)
181
  results = gr.Markdown()
182
  base_model.change(return_models_for_base_model, base_model, results)
183
  gr.Markdown("## Base model rankings ")