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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -192,13 +192,10 @@ class LangChain_Document_QA:
192
 
193
 
194
 
195
- def _text_box(self,customer_emotion,customer_sentiment_score):
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):
204
  client=self._history_of_chat()
 
192
 
193
 
194
 
195
+ def _text_box(self,customer_emotion,customer_sentiment_score):
196
+ sentiment_str = ', '.join([f'{label}: {score}' for label, score in zip(customer_sentiment_score['Sentiment'], sentiment_data['Score'])])
197
+ emotion_str = ', '.join([f'{emotion}: {score}' for emotion, score in zip(customer_emotion['Emotion'], emotion_data['Score'])])
 
 
198
  return f"Sentiment: {sentiment_str}, Emotion: {customer_emotion}"
 
199
 
200
  def _on_sentiment_btn_click(self):
201
  client=self._history_of_chat()