deadshot2003 commited on
Commit
e44d315
·
verified ·
1 Parent(s): 22e7460

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
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']