MattGPT commited on
Commit
8bb20f6
1 Parent(s): c2dfb48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,6 +8,7 @@ def add_model_to_list(new_model):
8
  if new_model and new_model not in model_list:
9
  model_list.append(new_model)
10
  return model_list
 
11
 
12
  def create_config(model_name, num_labels, use_cache):
13
  if model_name not in model_list:
@@ -18,7 +19,7 @@ def create_config(model_name, num_labels, use_cache):
18
  with gr.Blocks() as demo:
19
  gr.Markdown("## Config Class - Transformers")
20
  with gr.Row():
21
- model_dropdown = gr.Dropdown(label="Select a Model", choices=model_list, value=model_list[0])
22
  new_model_input = gr.Textbox(label="Add a New Model", placeholder="Enter model name")
23
  add_model_button = gr.Button("Add Model")
24
  num_labels_input = gr.Number(label="Number of Labels", value=2)
 
8
  if new_model and new_model not in model_list:
9
  model_list.append(new_model)
10
  return model_list
11
+ allow_custom_value=True
12
 
13
  def create_config(model_name, num_labels, use_cache):
14
  if model_name not in model_list:
 
19
  with gr.Blocks() as demo:
20
  gr.Markdown("## Config Class - Transformers")
21
  with gr.Row():
22
+ model_dropdown = gr.Dropdown(label="Select a Model", choices=model_list, value=model_list[0], allow_custom_value=True)
23
  new_model_input = gr.Textbox(label="Add a New Model", placeholder="Enter model name")
24
  add_model_button = gr.Button("Add Model")
25
  num_labels_input = gr.Number(label="Number of Labels", value=2)