RamAnanth1 commited on
Commit
eea7337
·
1 Parent(s): 8daf02c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -93,9 +93,9 @@ def get_transcript_url(url):
93
 
94
  topic = transcription_result['iab_categories_result']['summary']
95
 
96
- print(topic)
97
 
98
- return transcription_result['text'], transcription_result['summary'], df, topic
99
 
100
  # def get_transcript_file(filename):
101
 
@@ -192,7 +192,7 @@ with gr.Blocks() as demo:
192
  with gr.TabItem('Sentiment Analysis', visible = False) as sentiment_tab:
193
  sentiment_analysis = gr.Dataframe(label = "Sentiment Analysis Result" )
194
  with gr.TabItem('Topic Detection', visible = False) as topic_detection_tab:
195
- topic_detection = gr.Textbox(label = "Topic Detection Result" )
196
 
197
 
198
  inputs.submit(get_transcript_url, [inputs], [transcript, summary, sentiment_analysis, topic_detection])
 
93
 
94
  topic = transcription_result['iab_categories_result']['summary']
95
 
96
+ df_topic = pd.DataFrame(topic)
97
 
98
+ return transcription_result['text'], transcription_result['summary'], df, df_topic.head(3)
99
 
100
  # def get_transcript_file(filename):
101
 
 
192
  with gr.TabItem('Sentiment Analysis', visible = False) as sentiment_tab:
193
  sentiment_analysis = gr.Dataframe(label = "Sentiment Analysis Result" )
194
  with gr.TabItem('Topic Detection', visible = False) as topic_detection_tab:
195
+ topic_detection = gr.Dataframe(label = "Topic Detection Result" )
196
 
197
 
198
  inputs.submit(get_transcript_url, [inputs], [transcript, summary, sentiment_analysis, topic_detection])