RamAnanth1 commited on
Commit
4a6ab73
·
1 Parent(s): eaddfad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -83,8 +83,14 @@ def get_transcript_url(url, audio_intelligence_options):
83
  else:
84
  time.sleep(3)
85
 
86
-
87
- return transcription_result['text'], transcription_result['summary'], transcription_result['sentiment_analysis_results']
 
 
 
 
 
 
88
 
89
  def get_transcript_file(filename):
90
 
 
83
  else:
84
  time.sleep(3)
85
 
86
+ res = transcription_result['sentiment_analysis_results']
87
+ sentiment_analysis_result = ''
88
+ for elt in res:
89
+ sentiment_analysis_result = sentiment_analysis_result + "TEXT: "+ elt['text']+ "\n"
90
+ sentiment_analysis_result = sentiment_analysis_result + "SENTIMENT: " + elt['sentiment'] + "\n"
91
+ sentiment_analysis_result = sentiment_analysis_result + "CONFIDENCE: " + round(float(elt['confidence']), 2) + "\n"
92
+
93
+ return transcription_result['text'], transcription_result['summary'], sentiment_analysis_result
94
 
95
  def get_transcript_file(filename):
96