KarthickAdopleAI commited on
Commit
3f7079c
·
verified ·
1 Parent(s): 661fbe3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -114,6 +114,11 @@ def emotion_analysis():
114
  bot_emotion=sentiment.emotion_analysis(bot_conversation)
115
  return "Emotions for customer_conversation:\n"+customer_emotion+"\nEmotions for sales_agent_conversation:\n"+bot_emotion
116
 
 
 
 
 
 
117
  with gr.Blocks(theme="Taithrah/Minimal") as demo:
118
  gr.HTML("""<center><h1>Sales Persona Chatbot</h1></center>""")
119
 
@@ -163,6 +168,7 @@ with gr.Blocks(theme="Taithrah/Minimal") as demo:
163
  emotion_btn.click(emotion_analysis,[],emotion_view)
164
  clear.click(lambda: None, None, chatbot, queue=False)
165
  clear.click(lambda: None, None, show_stages, queue=False)
 
166
 
167
  demo.queue()
168
  demo.launch()
 
114
  bot_emotion=sentiment.emotion_analysis(bot_conversation)
115
  return "Emotions for customer_conversation:\n"+customer_emotion+"\nEmotions for sales_agent_conversation:\n"+bot_emotion
116
 
117
+ def clear_stages():
118
+ global stage
119
+ stage = ""
120
+ return ""
121
+
122
  with gr.Blocks(theme="Taithrah/Minimal") as demo:
123
  gr.HTML("""<center><h1>Sales Persona Chatbot</h1></center>""")
124
 
 
168
  emotion_btn.click(emotion_analysis,[],emotion_view)
169
  clear.click(lambda: None, None, chatbot, queue=False)
170
  clear.click(lambda: None, None, show_stages, queue=False)
171
+ clear.click(clear_stages,[],show_stages)
172
 
173
  demo.queue()
174
  demo.launch()