ms180 commited on
Commit
107649c
1 Parent(s): 6db9565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -17
app.py CHANGED
@@ -226,23 +226,35 @@ Due to resource limitation, you can only train 10 epochs on maximum.
226
  )
227
 
228
  with gr.Row():
229
- finetune_btn = gr.Button("Finetune Model", variant="primary")
230
- finetune_btn.click(
231
- finetune_model,
232
- [
233
- lang,
234
- task,
235
- tempdir_path,
236
- log_every,
237
- max_epoch,
238
- scheduler,
239
- warmup_steps,
240
- optimizer,
241
- learning_rate,
242
- weight_decay,
243
- ],
244
- [trained_model, hyp_text]
245
- )
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
  gr.Markdown(load_markdown())
248
 
 
226
  )
227
 
228
  with gr.Row():
229
+ with gr.Column():
230
+ baseline_btn = gr.Button("Run Baseline", variant="secondary")
231
+ baseline_btn.click(
232
+ baseline_model,
233
+ [
234
+ lang,
235
+ task,
236
+ tempdir_path,
237
+ ],
238
+ [ref_text, base_text]
239
+ )
240
+ with gr.Column():
241
+ finetune_btn = gr.Button("Finetune Model", variant="primary")
242
+ finetune_btn.click(
243
+ finetune_model,
244
+ [
245
+ lang,
246
+ task,
247
+ tempdir_path,
248
+ log_every,
249
+ max_epoch,
250
+ scheduler,
251
+ warmup_steps,
252
+ optimizer,
253
+ learning_rate,
254
+ weight_decay,
255
+ ],
256
+ [trained_model, hyp_text]
257
+ )
258
 
259
  gr.Markdown(load_markdown())
260