K00B404 commited on
Commit
335f729
·
verified ·
1 Parent(s): 43b4390

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -17
app.py CHANGED
@@ -156,10 +156,7 @@ 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:
161
- # generated_config = gr.Textbox(label='Generated Config', interactive=False)
162
- # btn_generate_config = gr.Button('Generate Config', variant='secondary')
163
  # btn_generate_config.click(fn=partial_generate_config, inputs=[input_base_model, input_models, input_layer_range], outputs=[generated_config])
164
 
165
 
@@ -241,21 +238,26 @@ def merge(yaml_config: str, hf_token: str, repo_name: str) -> Iterable[List[Log]
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')
261
 
 
156
  from itertools import chain
157
 
158
  # Generate config block
159
+
 
 
 
160
  # btn_generate_config.click(fn=partial_generate_config, inputs=[input_base_model, input_models, input_layer_range], outputs=[generated_config])
161
 
162
 
 
238
  with gr.Blocks() as demo:
239
  gr.Markdown(MARKDOWN_DESCRIPTION)
240
 
241
+
 
 
 
 
 
 
 
 
 
 
 
 
242
 
243
  with gr.Row():
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
+ #gen_config_block = gr.Blocks()
258
+ #with gen_config_block:
259
+ # generated_config = gr.Textbox(label='Generated Config', interactive=False)
260
+ # btn_generate_config = gr.Button('Generate Config', variant='secondary')
261
  generated_config = gr.Textbox(label='Generated Config', interactive=False)
262
  btn_generate_config = gr.Button('Generate Config', variant='secondary')
263