fffiloni commited on
Commit
3115754
·
1 Parent(s): 681a05d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ whisper = gr.Interface.load(name="spaces/sanchit-gandhi/whisper-large-v2")
14
  tts = gr.Interface.load(name="spaces/Flux9665/IMS-Toucan")
15
  talking_face = gr.Blocks.load(name="spaces/fffiloni/one-shot-talking-face", api_key=token)
16
 
17
- def infer(audio, openai_api_key):
18
 
19
  whisper_result = whisper(audio, None, "translate", fn_index=0)
20
 
@@ -122,7 +122,7 @@ with gr.Blocks(css="style.css") as demo:
122
 
123
  send_btn = gr.Button("Send my request !")
124
 
125
- send_btn.click(infer, inputs=[record_input, openai_api_key], outputs=[whisper_tr.update(visible=False), gpt_response, error_handler, share_group])
126
  share_button.click(None, [], [], _js=share_js)
127
 
128
  demo.queue(max_size=32, concurrency_count=20).launch(debug=True)
 
14
  tts = gr.Interface.load(name="spaces/Flux9665/IMS-Toucan")
15
  talking_face = gr.Blocks.load(name="spaces/fffiloni/one-shot-talking-face", api_key=token)
16
 
17
+ def infer(audio, openai_api_key, progress=gr.Progress()):
18
 
19
  whisper_result = whisper(audio, None, "translate", fn_index=0)
20
 
 
122
 
123
  send_btn = gr.Button("Send my request !")
124
 
125
+ send_btn.click(infer, inputs=[record_input, openai_api_key], outputs=[whisper_tr, gpt_response, error_handler, share_group])
126
  share_button.click(None, [], [], _js=share_js)
127
 
128
  demo.queue(max_size=32, concurrency_count=20).launch(debug=True)