Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,14 @@ app = FastAPI()
|
|
10 |
|
11 |
chatbot = pipeline(model="Kaludi/Customer-Support-Assistant-V2")
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
def DS_chatbot(message,history):
|
14 |
conversation = chatbot(message)
|
15 |
return conversation[0]['generated_text']
|
|
|
10 |
|
11 |
chatbot = pipeline(model="Kaludi/Customer-Support-Assistant-V2")
|
12 |
|
13 |
+
|
14 |
+
def add_message(history, message):
|
15 |
+
for x in message["files"]:
|
16 |
+
history.append(((x,), None))
|
17 |
+
if message["text"] is not None:
|
18 |
+
history.append((message["text"], None))
|
19 |
+
return history, gr.MultimodalTextbox(value=None, interactive=False)
|
20 |
+
|
21 |
def DS_chatbot(message,history):
|
22 |
conversation = chatbot(message)
|
23 |
return conversation[0]['generated_text']
|