deepakchawla-cb commited on
Commit
106b0fa
·
1 Parent(s): 7326090

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -164,10 +164,10 @@ def inference(audio, sentiment_option):
164
 
165
  sentiment_results = analyze_sentiment(result.text)
166
  print(result.text)
167
- print(predict(result.text))
168
  sentiment_output = display_sentiment_results(sentiment_results, sentiment_option)
169
 
170
- return lang.upper(), result.text, sentiment_output
171
 
172
  title = """<h1 align="center">🎤 Multilingual ASR 💬</h1>"""
173
  image_path = "thmbnail.jpg"
@@ -242,7 +242,9 @@ with block:
242
 
243
  sentiment_output = gr.Textbox(label="Sentiment Analysis Results", output=True)
244
 
245
- btn.click(inference, inputs=[audio, sentiment_option], outputs=[lang_str, text, sentiment_output])
 
 
246
 
247
  # gr.HTML('''
248
  # <div class="footer">
 
164
 
165
  sentiment_results = analyze_sentiment(result.text)
166
  print(result.text)
167
+ prediction = predict(result.text)
168
  sentiment_output = display_sentiment_results(sentiment_results, sentiment_option)
169
 
170
+ return lang.upper(), result.text, sentiment_output, prediction
171
 
172
  title = """<h1 align="center">🎤 Multilingual ASR 💬</h1>"""
173
  image_path = "thmbnail.jpg"
 
242
 
243
  sentiment_output = gr.Textbox(label="Sentiment Analysis Results", output=True)
244
 
245
+ prediction = gr.Textbox(label="Prediction")
246
+
247
+ btn.click(inference, inputs=[audio, sentiment_option], outputs=[lang_str, text, sentiment_output, prediction])
248
 
249
  # gr.HTML('''
250
  # <div class="footer">