Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
•
d3a2d60
1
Parent(s):
dd465fa
Update app.py
Browse files
app.py
CHANGED
@@ -214,7 +214,11 @@ class LangChain_Document_QA:
|
|
214 |
|
215 |
|
216 |
def _text_box(self,customer_emotion,customer_sentiment_score):
|
217 |
-
|
|
|
|
|
|
|
|
|
218 |
|
219 |
def _on_sentiment_btn_click(self):
|
220 |
client=self._history_of_chat()
|
|
|
214 |
|
215 |
|
216 |
def _text_box(self,customer_emotion,customer_sentiment_score):
|
217 |
+
sentiment_data = customer_sentiment_score
|
218 |
+
emotion_data = customer_emotion
|
219 |
+
sentiment_str = ', '.join([f'{label}: {score}' for label, score in zip(sentiment_data['Labels'], sentiment_data['Score'])])
|
220 |
+
emotion_str = ', '.join([f'{emotion}: {score}' for emotion, score in zip(emotion_data['Emotion'], emotion_data['Score'])])
|
221 |
+
return f"Sentiment: {sentiment_str}, Emotion: {emotion_str}"
|
222 |
|
223 |
def _on_sentiment_btn_click(self):
|
224 |
client=self._history_of_chat()
|