wasmdashai commited on
Commit
932e4e8
·
verified ·
1 Parent(s): f683700

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -641,8 +641,9 @@ pro=TrinerModelVITS(dir_model=dir_model,
641
  token=token,
642
  device=device
643
  )
644
- def loadd_d():
645
  token=os.environ.get("key_")
 
646
  return token
647
  @spaces.GPU(duration=30)
648
  def run_train_epoch(num):
@@ -688,7 +689,7 @@ with gr.Blocks() as interface:
688
  output_i = gr.Textbox(label="namemodel")
689
  output_ini = gr.Textbox(label="token")
690
  label=gr.Label("hhh")
691
- btn_init.click(loadd_d,[],[label])
692
  with gr.Accordion("init_Starting ", open=False):
693
  btn_init = gr.Button("init start")
694
  output_init = gr.Textbox(label="init")
 
641
  token=token,
642
  device=device
643
  )
644
+ def loadd_d(n_model):
645
  token=os.environ.get("key_")
646
+ model=VitsModel.from_pretrained(n_model,token=token)
647
  return token
648
  @spaces.GPU(duration=30)
649
  def run_train_epoch(num):
 
689
  output_i = gr.Textbox(label="namemodel")
690
  output_ini = gr.Textbox(label="token")
691
  label=gr.Label("hhh")
692
+ btn_init.click(loadd_d,[output_i],[label])
693
  with gr.Accordion("init_Starting ", open=False):
694
  btn_init = gr.Button("init start")
695
  output_init = gr.Textbox(label="init")