arahrooh31 commited on
Commit
3e4ee13
·
1 Parent(s): 486b0b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -105,7 +105,7 @@ def calculate_sentiment_score(output):
105
  )
106
  sentiment_score = re.sub('\W+', '', response['choices'][0]['text'])
107
  sentiment_scores.append(sentiment_score)
108
- return sentiment_scores
109
 
110
  def process_transcript_and_extract_qa(output):
111
  lines = output.split("\n")
@@ -142,7 +142,7 @@ with demo:
142
  audio_file = gr.Audio(type="filepath")
143
  output = gr.Textbox(label ='Transcript')
144
  output_str = gr.Textbox(label='Questions and Answers')
145
- sentiment_scores = gr.Textbox(label ='Sentiment Score')
146
 
147
  b1 = gr.Button("Transcribe Call")
148
  b1.click(transcribe, inputs=audio_file, outputs=output)
 
105
  )
106
  sentiment_score = re.sub('\W+', '', response['choices'][0]['text'])
107
  sentiment_scores.append(sentiment_score)
108
+ return ', '.join(sentiment_scores)
109
 
110
  def process_transcript_and_extract_qa(output):
111
  lines = output.split("\n")
 
142
  audio_file = gr.Audio(type="filepath")
143
  output = gr.Textbox(label ='Transcript')
144
  output_str = gr.Textbox(label='Questions and Answers')
145
+ sentiment_scores = gr.Textbox(label ='Sentiment Scores')
146
 
147
  b1 = gr.Button("Transcribe Call")
148
  b1.click(transcribe, inputs=audio_file, outputs=output)