Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
•
3690e9b
1
Parent(s):
76918d0
Update app.py
Browse files
app.py
CHANGED
@@ -185,20 +185,20 @@ class Chat_Bot:
|
|
185 |
scores=self._text_box(customer_emotion,agent_emotion,agent_sentiment_score,customer_sentiment_score)
|
186 |
|
187 |
customer_fig=self._display_graph(customer_sentiment_score)
|
188 |
-
customer_fig.update_layout(title="Sentiment Analysis",width=
|
189 |
|
190 |
agent_fig=self._display_graph(agent_sentiment_score)
|
191 |
-
agent_fig.update_layout(title="Sentiment Analysis",width=
|
192 |
|
193 |
agent_emotion_score = sentiment.emotion_analysis_for_graph(agent_emotion)
|
194 |
|
195 |
agent_emotion_fig=self._display_graph(agent_emotion_score)
|
196 |
-
agent_emotion_fig.update_layout(title="Emotion Analysis",width=
|
197 |
|
198 |
customer_emotion_score = sentiment.emotion_analysis_for_graph(customer_emotion)
|
199 |
|
200 |
customer_emotion_fig=self._display_graph(customer_emotion_score)
|
201 |
-
customer_emotion_fig.update_layout(title="Emotion Analysis",width=
|
202 |
|
203 |
return scores,customer_fig,agent_fig,customer_emotion_fig,agent_emotion_fig
|
204 |
|
@@ -260,16 +260,16 @@ class Chat_Bot:
|
|
260 |
gr.HTML("""<center><h1>Sentiment and Emotion Score Graph</h1></center>""")
|
261 |
with gr.Row():
|
262 |
with gr.Column(scale=0.70, min_width=0):
|
263 |
-
plot =gr.Plot(label="Customer", size=(
|
264 |
with gr.Row():
|
265 |
with gr.Column(scale=0.70, min_width=0):
|
266 |
-
plot_2 =gr.Plot(label="Agent", size=(
|
267 |
with gr.Row():
|
268 |
with gr.Column(scale=0.70, min_width=0):
|
269 |
-
plot_3 =gr.Plot(label="Customer_Emotion", size=(
|
270 |
with gr.Row():
|
271 |
with gr.Column(scale=0.70, min_width=0):
|
272 |
-
plot_4 =gr.Plot(label="Agent_Emotion", size=(
|
273 |
|
274 |
|
275 |
txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])
|
|
|
185 |
scores=self._text_box(customer_emotion,agent_emotion,agent_sentiment_score,customer_sentiment_score)
|
186 |
|
187 |
customer_fig=self._display_graph(customer_sentiment_score)
|
188 |
+
customer_fig.update_layout(title="Sentiment Analysis",width=400)
|
189 |
|
190 |
agent_fig=self._display_graph(agent_sentiment_score)
|
191 |
+
agent_fig.update_layout(title="Sentiment Analysis",width=400)
|
192 |
|
193 |
agent_emotion_score = sentiment.emotion_analysis_for_graph(agent_emotion)
|
194 |
|
195 |
agent_emotion_fig=self._display_graph(agent_emotion_score)
|
196 |
+
agent_emotion_fig.update_layout(title="Emotion Analysis",width=400)
|
197 |
|
198 |
customer_emotion_score = sentiment.emotion_analysis_for_graph(customer_emotion)
|
199 |
|
200 |
customer_emotion_fig=self._display_graph(customer_emotion_score)
|
201 |
+
customer_emotion_fig.update_layout(title="Emotion Analysis",width=400)
|
202 |
|
203 |
return scores,customer_fig,agent_fig,customer_emotion_fig,agent_emotion_fig
|
204 |
|
|
|
260 |
gr.HTML("""<center><h1>Sentiment and Emotion Score Graph</h1></center>""")
|
261 |
with gr.Row():
|
262 |
with gr.Column(scale=0.70, min_width=0):
|
263 |
+
plot =gr.Plot(label="Customer", size=(300, 400))
|
264 |
with gr.Row():
|
265 |
with gr.Column(scale=0.70, min_width=0):
|
266 |
+
plot_2 =gr.Plot(label="Agent", size=(300, 400))
|
267 |
with gr.Row():
|
268 |
with gr.Column(scale=0.70, min_width=0):
|
269 |
+
plot_3 =gr.Plot(label="Customer_Emotion", size=(300, 400))
|
270 |
with gr.Row():
|
271 |
with gr.Column(scale=0.70, min_width=0):
|
272 |
+
plot_4 =gr.Plot(label="Agent_Emotion", size=(300, 400))
|
273 |
|
274 |
|
275 |
txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])
|