K00B404 commited on
Commit
43b4390
1 Parent(s): 9267bee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -155,20 +155,6 @@ def generate_config(base_model, models, layer_range, merge_method):
155
  from functools import partial
156
  from itertools import chain
157
 
158
- # Configure dropdown options
159
- BASE_MODELS = ["bert-base-uncased", "distilbert-base-uncased", ...] # Add other base models here
160
- MERGE_METHODS = ["linear", "slerp", ...] # Add other merge methods here
161
- LAYER_RANGE = range(32)
162
-
163
- # Create input objects
164
- input_base_model = gr.Dropdown(label='Base Model', choices=BASE_MODELS)
165
- input_models = gr.Dropdown(label='Models', choices=BASE_MODELS)
166
- input_layer_range = gr.Slider(minimum=0, maximum=32, step=1, label='Layer Range')
167
- input_merge_method = gr.Dropdown(label='Merge Method', choices=MERGE_METHODS)
168
-
169
- # Wrap generate_config in a partial function to fix the signature
170
- partial_generate_config = partial(generate_config, base_model=input_base_model, merge_method=input_merge_method)
171
-
172
  # Generate config block
173
  #gen_config_block = gr.Blocks()
174
  #with gen_config_block:
@@ -254,6 +240,21 @@ def merge(yaml_config: str, hf_token: str, repo_name: str) -> Iterable[List[Log]
254
 
255
  with gr.Blocks() as demo:
256
  gr.Markdown(MARKDOWN_DESCRIPTION)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  with gr.Row():
258
  generated_config = gr.Textbox(label='Generated Config', interactive=False)
259
  btn_generate_config = gr.Button('Generate Config', variant='secondary')
 
155
  from functools import partial
156
  from itertools import chain
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  # Generate config block
159
  #gen_config_block = gr.Blocks()
160
  #with gen_config_block:
 
240
 
241
  with gr.Blocks() as demo:
242
  gr.Markdown(MARKDOWN_DESCRIPTION)
243
+
244
+ # Configure dropdown options
245
+ BASE_MODELS = ["bert-base-uncased", "distilbert-base-uncased", ...] # Add other base models here
246
+ MERGE_METHODS = ["linear", "slerp", ...] # Add other merge methods here
247
+ LAYER_RANGE = range(32)
248
+
249
+ # Create input objects
250
+ input_base_model = gr.Dropdown(label='Base Model', choices=BASE_MODELS)
251
+ input_models = gr.Dropdown(label='Models', choices=BASE_MODELS)
252
+ input_layer_range = gr.Slider(minimum=0, maximum=32, step=1, label='Layer Range')
253
+ input_merge_method = gr.Dropdown(label='Merge Method', choices=MERGE_METHODS)
254
+
255
+ # Wrap generate_config in a partial function to fix the signature
256
+ partial_generate_config = partial(generate_config, base_model=input_base_model, merge_method=input_merge_method)
257
+
258
  with gr.Row():
259
  generated_config = gr.Textbox(label='Generated Config', interactive=False)
260
  btn_generate_config = gr.Button('Generate Config', variant='secondary')