RamAnanth1 commited on
Commit
dbe0d2a
·
1 Parent(s): dd9eb54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -37,14 +37,14 @@ def translate(audio):
37
 
38
  return transcription.text
39
 
40
- gr.Markdown("""
 
41
  # Emotion Detection From Speech Using Whisper
42
 
43
  """)
44
-
45
- audio_input = gr.Audio(label = 'Record Audio Input',source="microphone",type="filepath")
46
-
47
- transcript_output = gr.Textbox(label="Transcription in your the language you spoke")
48
-
49
- iface = gr.Interface(fn=translate, inputs=audio_input, outputs=transcript_output)
50
- iface.launch()
 
37
 
38
  return transcription.text
39
 
40
+ with gr.Blocks() as demo:
41
+ gr.Markdown("""
42
  # Emotion Detection From Speech Using Whisper
43
 
44
  """)
45
+ audio_input = gr.Audio(label = 'Record Audio Input',source="microphone",type="filepath")
46
+
47
+ transcript_output = gr.Textbox(label="Transcription in your the language you spoke")
48
+
49
+ iface = gr.Interface(fn=translate, inputs=audio_input, outputs=transcript_output)
50
+ demo.launch()