wangjin2000 commited on
Commit
4cc8e82
·
verified ·
1 Parent(s): 32f88a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -26
app.py CHANGED
@@ -221,6 +221,10 @@ MODEL_OPTIONS = [
221
  "facebook/esm2_t33_650M_UR50D",
222
  ] # models users can choose from
223
 
 
 
 
 
224
 
225
  # Load the data from pickle files (replace with your local paths)
226
  with open("./datasets/train_sequences_chunked_by_family.pkl", "rb") as f:
@@ -309,33 +313,35 @@ with demo:
309
  gr.Markdown("# DEMO FOR ESM2Bind")
310
  #gr.Textbox(dubug_result)
311
 
 
312
  with gr.Tab("Finetune Pre-trained Model"):
313
- gr.Markdown("## Finetune Pre-trained Model")
314
- with gr.Column():
315
- gr.Markdown("## Load Inputs & Select Parameters")
316
- gr.Markdown(
317
- """ Pick a base model and press **Finetune Pre-trained Model!"""
318
- )
319
- with gr.Row():
320
- with gr.Column(scale=0.5, variant="compact"):
321
- base_model_name = gr.Dropdown(
322
- choices=MODEL_OPTIONS,
323
- value=MODEL_OPTIONS[0],
324
- label="Base Model Name",
325
- interactive = True,
326
- )
327
- finetune_button = gr.Button(
328
- value="Finetune Pre-trained Model",
329
- interactive=True,
330
- variant="primary",
331
- )
332
- finetune_output_text = gr.Textbox(
333
- lines=1,
334
- max_lines=12,
335
- label="Finetune Status",
336
- placeholder="Finetune Status Shown Here",
337
- )
338
- # Tab "Finetune Pre-trained Model" actions
 
339
  finetune_button.click(
340
  fn = train_function_no_sweeps,
341
  inputs=[base_model_name], #finetune_dataset_name],
 
221
  "facebook/esm2_t33_650M_UR50D",
222
  ] # models users can choose from
223
 
224
+ PEFT_MODEL_OPTIONS = [
225
+ "AmelieSchreiber/esm2_t12_35M_lora_binding_sites_v2_cp3",
226
+ ] # finetuned models
227
+
228
 
229
  # Load the data from pickle files (replace with your local paths)
230
  with open("./datasets/train_sequences_chunked_by_family.pkl", "rb") as f:
 
313
  gr.Markdown("# DEMO FOR ESM2Bind")
314
  #gr.Textbox(dubug_result)
315
 
316
+
317
  with gr.Tab("Finetune Pre-trained Model"):
318
+ gr.Markdown("## Finetune Pre-trained Model")
319
+ with gr.Column():
320
+ gr.Markdown("## Select a base model")
321
+ gr.Markdown(
322
+ """ Pick a base model and press **Finetune Pre-trained Model!"""
323
+ )
324
+ with gr.Row():
325
+ with gr.Column(scale=0.5, variant="compact"):
326
+ base_model_name = gr.Dropdown(
327
+ choices=MODEL_OPTIONS,
328
+ value=MODEL_OPTIONS[0],
329
+ label="Base Model Name",
330
+ interactive = True,
331
+ )
332
+ finetune_button = gr.Button(
333
+ value="Finetune Pre-trained Model",
334
+ interactive=True,
335
+ variant="primary",
336
+ )
337
+ finetune_output_text = gr.Textbox(
338
+ lines=1,
339
+ max_lines=12,
340
+ label="Finetune Status",
341
+ placeholder="Finetune Status Shown Here",
342
+ )
343
+
344
+ # "Finetune Pre-trained Model" actions
345
  finetune_button.click(
346
  fn = train_function_no_sweeps,
347
  inputs=[base_model_name], #finetune_dataset_name],