RamAnanth1 commited on
Commit
c91bff5
·
1 Parent(s): 8e29f49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -174,23 +174,22 @@ with gr.Blocks() as demo:
174
  gr.Markdown(description)
175
 
176
  with gr.Column(elem_id = "col_container"):
177
- with gr.Tab("Audio URL file"):
178
- inputs = gr.Textbox(label = "Enter the url for the audio file")
179
- #audio_intelligence_options = gr.CheckboxGroup(audio_intelligence_list, label="Audio Intelligence Options")
180
- b1 = gr.Button('Transcribe')
181
 
182
- with gr.Tab("Upload Audio as File"):
183
- audio_input_u = gr.Audio(label = 'Upload Audio',source="upload",type="filepath")
184
- transcribe_audio_u = gr.Button('Transcribe')
185
-
186
- transcript = gr.Textbox(label = "Transcript Result" )
187
- summary = gr.Textbox(label = "Summary Result")
188
- sentiment_analysis = gr.Textbox(label = "Sentiment Analysis Result" )
 
 
 
 
189
 
190
 
191
  inputs.submit(get_transcript_url, [inputs], [transcript, summary, sentiment_analysis])
192
  b1.click(get_transcript_url, [inputs], [transcript, summary, sentiment_analysis])
193
- transcribe_audio_u.click(get_transcript_file, [audio_input_u], [transcript])
194
 
195
  examples = gr.Examples(examples = [["https://github.com/AssemblyAI-Examples/assemblyai-and-python-in-5-minutes/blob/main/audio.mp3?raw=true"]], inputs = inputs, outputs=[transcript, summary, sentiment_analysis], cache_examples = True, fn = get_transcript_url)
196
 
 
174
  gr.Markdown(description)
175
 
176
  with gr.Column(elem_id = "col_container"):
 
 
 
 
177
 
178
+ inputs = gr.Textbox(label = "Enter the url for the audio file")
179
+ #audio_intelligence_options = gr.CheckboxGroup(audio_intelligence_list, label="Audio Intelligence Options")
180
+ b1 = gr.Button('Transcribe')
181
+
182
+ with gr.Tabs():
183
+ with gr.TabItem('Transcript') as transcript_tab:
184
+ transcript = gr.Textbox(label = "Transcript Result" )
185
+ with gr.TabItem('Summary', visible = False) as summary_tab:
186
+ summary = gr.Textbox(label = "Summary Result")
187
+ with gr.TabItem('Sentiment Analysis', visible = False) as sentiment_tab
188
+ sentiment_analysis = gr.Textbox(label = "Sentiment Analysis Result" )
189
 
190
 
191
  inputs.submit(get_transcript_url, [inputs], [transcript, summary, sentiment_analysis])
192
  b1.click(get_transcript_url, [inputs], [transcript, summary, sentiment_analysis])
 
193
 
194
  examples = gr.Examples(examples = [["https://github.com/AssemblyAI-Examples/assemblyai-and-python-in-5-minutes/blob/main/audio.mp3?raw=true"]], inputs = inputs, outputs=[transcript, summary, sentiment_analysis], cache_examples = True, fn = get_transcript_url)
195