Karthikeyan commited on
Commit
9cc4b4f
·
1 Parent(s): cda9219

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -196,8 +196,8 @@ class LangChain_Document_QA:
196
  sentiment_data = customer_sentiment_score
197
  emotion_data = customer_emotion
198
  sentiment_str = ', '.join([f'{label}: {score}' for label, score in zip(sentiment_data['Sentiment'], sentiment_data['Score'])])
199
- emotion_str = ', '.join([f'{emotion}: {score}' for emotion, score in zip(emotion_data['Emotion'], emotion_data['Score'])])
200
- return f"Sentiment: {sentiment_str}, Emotion: {emotion_str}"
201
  #return f"Sentiment: \n{customer_sentiment_score[0]} \n {customer_sentiment_score[1]} Emotion: \n{customer_emotion[0]}\n{customer_emotion[1]}\n"
202
 
203
  def _on_sentiment_btn_click(self):
 
196
  sentiment_data = customer_sentiment_score
197
  emotion_data = customer_emotion
198
  sentiment_str = ', '.join([f'{label}: {score}' for label, score in zip(sentiment_data['Sentiment'], sentiment_data['Score'])])
199
+ #emotion_str = ', '.join([f'{emotion}: {score}' for emotion, score in zip(emotion_data['Emotion'], emotion_data['Score'])])
200
+ return f"Sentiment: {sentiment_str}, Emotion: {customer_emotion}"
201
  #return f"Sentiment: \n{customer_sentiment_score[0]} \n {customer_sentiment_score[1]} Emotion: \n{customer_emotion[0]}\n{customer_emotion[1]}\n"
202
 
203
  def _on_sentiment_btn_click(self):