Update app.py
Browse files
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 = ["
|
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()
|