Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
•
3eab8f1
1
Parent(s):
0830766
Update app.py
Browse files
app.py
CHANGED
@@ -183,17 +183,26 @@ class LangChain_Document_QA:
|
|
183 |
return f"customer_emotion:{customer_emotion}\nagent_emotion:{agent_emotion}\nAgent_Sentiment_score:{agent_score}\nCustomer_sentiment_score:{customer_score}"
|
184 |
|
185 |
def _on_sentiment_btn_click(self):
|
186 |
-
client=self._history_of_chat()
|
187 |
|
188 |
customer_emotion=sentiment.emotion_analysis(client)
|
189 |
customer_sentiment_score = sentiment.analyze_sentiment_for_graph(client)
|
190 |
|
|
|
|
|
191 |
|
192 |
scores=self._text_box(customer_emotion,customer_sentiment_score)
|
193 |
|
194 |
customer_fig=self._display_graph(customer_sentiment_score)
|
195 |
customer_fig.update_layout(title="Sentiment Analysis",width=775)
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
198 |
customer_emotion_score = sentiment.emotion_analysis_for_graph(customer_emotion)
|
199 |
|
|
|
183 |
return f"customer_emotion:{customer_emotion}\nagent_emotion:{agent_emotion}\nAgent_Sentiment_score:{agent_score}\nCustomer_sentiment_score:{customer_score}"
|
184 |
|
185 |
def _on_sentiment_btn_click(self):
|
186 |
+
client,agent=self._history_of_chat()
|
187 |
|
188 |
customer_emotion=sentiment.emotion_analysis(client)
|
189 |
customer_sentiment_score = sentiment.analyze_sentiment_for_graph(client)
|
190 |
|
191 |
+
# agent_emotion=sentiment.emotion_analysis(agent)
|
192 |
+
# agent_sentiment_score = sentiment.analyze_sentiment_for_graph(agent)
|
193 |
|
194 |
scores=self._text_box(customer_emotion,customer_sentiment_score)
|
195 |
|
196 |
customer_fig=self._display_graph(customer_sentiment_score)
|
197 |
customer_fig.update_layout(title="Sentiment Analysis",width=775)
|
198 |
|
199 |
+
# agent_fig=self._display_graph(agent_sentiment_score)
|
200 |
+
# agent_fig.update_layout(title="Sentiment Analysis",width=775)
|
201 |
+
|
202 |
+
#agent_emotion_score = sentiment.emotion_analysis_for_graph(agent_emotion)
|
203 |
+
|
204 |
+
# agent_emotion_fig=self._display_graph(agent_emotion_score)
|
205 |
+
# agent_emotion_fig.update_layout(title="Emotion Analysis",width=775)
|
206 |
|
207 |
customer_emotion_score = sentiment.emotion_analysis_for_graph(customer_emotion)
|
208 |
|