Karthikeyan commited on
Commit
2b9fffc
1 Parent(s): 3690e9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -121,7 +121,7 @@ class Chat_Bot:
121
  scores = sentiment_scores.values()
122
  fig = px.bar(x=scores, y=labels, orientation='h', color=labels, color_discrete_map={"Negative": "red", "Positive": "green", "Neutral": "gray"})
123
  fig.update_traces(texttemplate='%{x:.2f}%', textposition='outside')
124
- fig.update_layout(height=500, width=200)
125
  return fig
126
 
127
  def _history_of_chat(self):
@@ -259,16 +259,16 @@ class Chat_Bot:
259
  with gr.Row():
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
 
 
121
  scores = sentiment_scores.values()
122
  fig = px.bar(x=scores, y=labels, orientation='h', color=labels, color_discrete_map={"Negative": "red", "Positive": "green", "Neutral": "gray"})
123
  fig.update_traces(texttemplate='%{x:.2f}%', textposition='outside')
124
+ fig.update_layout(height=300, width=160)
125
  return fig
126
 
127
  def _history_of_chat(self):
 
259
  with gr.Row():
260
  gr.HTML("""<center><h1>Sentiment and Emotion Score Graph</h1></center>""")
261
  with gr.Row():
262
+ with gr.Column(scale=0.50, min_width=0):
263
  plot =gr.Plot(label="Customer", size=(300, 400))
264
+ # with gr.Row():
265
+ with gr.Column(scale=0.50, min_width=0):
266
  plot_2 =gr.Plot(label="Agent", size=(300, 400))
267
  with gr.Row():
268
+ with gr.Column(scale=0.50, min_width=0):
269
  plot_3 =gr.Plot(label="Customer_Emotion", size=(300, 400))
270
+ # with gr.Row():
271
+ with gr.Column(scale=0.50, min_width=0):
272
  plot_4 =gr.Plot(label="Agent_Emotion", size=(300, 400))
273
 
274