Karthikeyan commited on
Commit
e3ea91a
1 Parent(s): 92c1052

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -199,15 +199,12 @@ class LangChain_Document_QA:
199
  scores=self._text_box(customer_emotion,customer_sentiment_score)
200
 
201
  customer_fig=self._display_graph(customer_sentiment_score)
202
- customer_fig.update_layout(title="Sentiment Analysis",width=740)
203
 
204
  customer_emotion_score = sentiment.emotion_analysis_for_graph(customer_emotion)
205
 
206
  customer_emotion_fig=self._display_graph_emotion(customer_emotion_score)
207
- customer_emotion_fig.update_layout(title="Emotion Analysis",width=700)
208
- print("scores :",scores)
209
- print("customer_fig :",customer_fig)
210
- print("customer_emotion_fig :",customer_emotion_fig)
211
  return scores,customer_fig,customer_emotion_fig
212
 
213
 
@@ -256,10 +253,11 @@ class LangChain_Document_QA:
256
  with gr.Row():
257
  gr.HTML("""<center><h1>Sentiment and Emotion Score Graph</h1></center>""")
258
  with gr.Row():
259
- with gr.Column(scale=0.55, min_width=0):
260
- plot =gr.Plot(label="Patient", size=(400, 500))
261
- with gr.Column(scale=0.45, min_width=0):
262
- plot_3 =gr.Plot(label="Patient_Emotion", size=(400, 500))
 
263
 
264
 
265
  txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])
 
199
  scores=self._text_box(customer_emotion,customer_sentiment_score)
200
 
201
  customer_fig=self._display_graph(customer_sentiment_score)
202
+ customer_fig.update_layout(title="Sentiment Analysis",width=800)
203
 
204
  customer_emotion_score = sentiment.emotion_analysis_for_graph(customer_emotion)
205
 
206
  customer_emotion_fig=self._display_graph_emotion(customer_emotion_score)
207
+ customer_emotion_fig.update_layout(title="Emotion Analysis",width=800)
 
 
 
208
  return scores,customer_fig,customer_emotion_fig
209
 
210
 
 
253
  with gr.Row():
254
  gr.HTML("""<center><h1>Sentiment and Emotion Score Graph</h1></center>""")
255
  with gr.Row():
256
+ with gr.Column(scale=1, min_width=0):
257
+ plot =gr.Plot(label="Patient", size=(500, 600))
258
+ with gr.Row():
259
+ with gr.Column(scale=1, min_width=0):
260
+ plot_3 =gr.Plot(label="Patient_Emotion", size=(500, 600))
261
 
262
 
263
  txt_msg = txt.submit(self._add_text, [chatbot, txt], [chatbot, txt])