Baseta commited on
Commit
0a22d6f
1 Parent(s): 33418de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -500,10 +500,6 @@ def change_choices():
500
 
501
 
502
  def clean():
503
- if hubert_model != None: # 考虑到轮询, 需要加个判断看是否 sid 是由有模型切换到无模型的
504
- print("clean_empty_cache")
505
- del net_g, n_spk, vc, hubert_model, tgt_sr # ,cpt
506
- hubert_model = net_g = n_spk = vc = hubert_model = tgt_sr = None
507
  return {"value": "", "__type__": "update"}
508
 
509
 
@@ -1549,7 +1545,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="red", secondary_hue="rose"),
1549
  tts_button = gr.Button(value="Speak")
1550
  tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
1551
  with gr.Row():
1552
- clean_button = gr.Button("Clean", variant="secondary", size='sm')
1553
  clean_button.click(fn=clean, inputs=[], outputs=[sid0])
1554
  with gr.Row():
1555
  with gr.Accordion('Wav2Lip', open=False, visible=False):
 
500
 
501
 
502
  def clean():
 
 
 
 
503
  return {"value": "", "__type__": "update"}
504
 
505
 
 
1545
  tts_button = gr.Button(value="Speak")
1546
  tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
1547
  with gr.Row():
1548
+ clean_button = gr.Button("Clean", variant="secondary", size='sm', visible='False')
1549
  clean_button.click(fn=clean, inputs=[], outputs=[sid0])
1550
  with gr.Row():
1551
  with gr.Accordion('Wav2Lip', open=False, visible=False):