tykiww commited on
Commit
717f53b
1 Parent(s): 8d7ed18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -18
app.py CHANGED
@@ -64,23 +64,14 @@ def main():
64
  dataset_upload)
65
  # Hyperparameters (allow selection, but hide in accordion.)
66
  with gr.Accordion("Advanced Tuning", open=False):
67
- # config
68
- peftparams = conf['model']['peft']
69
  sftparams = conf['model']['sft']
70
  # accordion container content
71
- gr.Markdown("### PEFT Parameters")
72
- r = gr.Textbox(label="r",
73
- value=peftparams['r'])
74
- alpha = gr.Textbox(label="LoRA alpha",
75
- value=peftparams['alpha'])
76
- dropout = gr.Textbox(label="LoRA dropout",
77
- value=peftparams['dropout'])
78
- bias = gr.Textbox(label="Bias",
79
- value=peftparams['bias'])
80
- seed = gr.Textbox(label="Random State",
81
- value=peftparams['seed'])
82
- rslora = gr.Textbox(label="Use R-S LoRA",
83
- value=peftparams['rslora'])
84
  gr.Markdown("### Supervised Fine-Tuning Parameters")
85
  gr.Markdown("List of items")
86
 
@@ -94,9 +85,8 @@ def main():
94
  tune_btn.click(fn=greet,
95
  inputs=[model_name,
96
  inject_prompt,
97
- dataset_predefined,
98
- # peft
99
- r, alpha, dropout, bias, seed, rslora
100
  # sft
101
  ],
102
  outputs=output)
 
64
  dataset_upload)
65
  # Hyperparameters (allow selection, but hide in accordion.)
66
  with gr.Accordion("Advanced Tuning", open=False):
67
+
 
68
  sftparams = conf['model']['sft']
69
  # accordion container content
70
+ #gr.Markdown("### PEFT Parameters")
71
+ dict_string = json.dumps(conf['model']['peft'], indent=4)
72
+ peft = gr.Textbox(label="PEFT Parameters", value=dict_string)
73
+
74
+
 
 
 
 
 
 
 
 
75
  gr.Markdown("### Supervised Fine-Tuning Parameters")
76
  gr.Markdown("List of items")
77
 
 
85
  tune_btn.click(fn=greet,
86
  inputs=[model_name,
87
  inject_prompt,
88
+ dataset_predefined,
89
+ peft
 
90
  # sft
91
  ],
92
  outputs=output)