michaeltangz commited on
Commit
a3d95dd
·
1 Parent(s): 574825e

refactor app.py to update demo launch logic; ensure proper execution within main guard

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -117,7 +117,8 @@ with gr.Blocks() as file:
117
  submit_button.click(transcribe, inputs=[input_audio_microphone, output], outputs=[output, latency_textbox])
118
  clear_button.click(clear, outputs=[output])
119
 
120
- with gr.Blocks(theme=gr.themes.Ocean()) as demo:
121
  gr.TabbedInterface([microphone, file], ["Microphone", "Transcribe from file"])
122
 
123
- demo.launch()
 
 
117
  submit_button.click(transcribe, inputs=[input_audio_microphone, output], outputs=[output, latency_textbox])
118
  clear_button.click(clear, outputs=[output])
119
 
120
+ with gr.Blocks() as demo:
121
  gr.TabbedInterface([microphone, file], ["Microphone", "Transcribe from file"])
122
 
123
+ if __name__ == "__main__":
124
+ demo.launch(share=False)