Chris4K commited on
Commit
197814b
·
1 Parent(s): 3260d32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -266,11 +266,14 @@ def topic_sale_inform (text):
266
 
267
 
268
  ####
269
-
 
270
  def callChains(current_message):
271
  sentiment_analysis_result = pipeline_predict_sentiment(current_message)
272
  topic_sale_inform_result = topic_sale_inform(current_message)
273
- final_answer = pipeline_predict_chat(current_message)
 
 
274
  return final_answer, sentiment_analysis_result, topic_sale_inform_result
275
 
276
  chat_bot = gr.Interface(fn=callChains , inputs="textbox", outputs=["textbox","textbox","textbox"], title="Conversation Bot with extra")
 
266
 
267
 
268
  ####
269
+ conversation = Conversation("Welcome")
270
+
271
  def callChains(current_message):
272
  sentiment_analysis_result = pipeline_predict_sentiment(current_message)
273
  topic_sale_inform_result = topic_sale_inform(current_message)
274
+ #conversation.append_response("The Big lebowski.")
275
+ #conversation.add_user_input("Is it good?")
276
+ final_answer = pipeline_predict_chat(convesation.add_user_input(current_message))
277
  return final_answer, sentiment_analysis_result, topic_sale_inform_result
278
 
279
  chat_bot = gr.Interface(fn=callChains , inputs="textbox", outputs=["textbox","textbox","textbox"], title="Conversation Bot with extra")