Chris4K commited on
Commit
bbb9f6e
·
1 Parent(s): d6d5d58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -256,7 +256,7 @@ app = gr.Interface(
256
  ###
257
  classifier = pipeline("zero-shot-classification")
258
  text = "This is a tutorial about Hugging Face."
259
- candidate_labels = ["tech", "education", "business"]
260
 
261
  def topic_sale_inform (text):
262
  res = classifier(text, candidate_labels)
@@ -270,7 +270,8 @@ def topic_sale_inform (text):
270
  def callChains(current_message):
271
  sentiment_analysis_result = pipeline_predict_sentiment(message)
272
  topic_sale_inform = topic_sale_inform(message)
273
-
 
274
 
275
  chat_bot = gr.Interface(fn=callChains , inputs="textbox", outputs=["textbox","textbox","textbox"], title="Conversation Bot with extra")
276
  # create a public link, set `share=True` in `launch()
 
256
  ###
257
  classifier = pipeline("zero-shot-classification")
258
  text = "This is a tutorial about Hugging Face."
259
+ candidate_labels = ["inform", "sell", "beschweren"]
260
 
261
  def topic_sale_inform (text):
262
  res = classifier(text, candidate_labels)
 
270
  def callChains(current_message):
271
  sentiment_analysis_result = pipeline_predict_sentiment(message)
272
  topic_sale_inform = topic_sale_inform(message)
273
+ final_answer = pipeline_predict_chat(message)
274
+ return final_answer, sentiment_analysis_result, topic_sale_inform
275
 
276
  chat_bot = gr.Interface(fn=callChains , inputs="textbox", outputs=["textbox","textbox","textbox"], title="Conversation Bot with extra")
277
  # create a public link, set `share=True` in `launch()