patti-j commited on
Commit
1846c8a
1 Parent(s): 6ff012c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -16,12 +16,12 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
16
  )
17
 
18
  chatbot = gr.Chatbot()
19
- message = gr.Textbox(label="What would you like to chat about?")
20
  response = gr.Textbox
21
 
22
- def respond(message, chat_history):
23
- response = get_chain(message, chat_history)
24
- chat_history.append((message, response))
25
  return "", chat_history
26
 
27
 
@@ -35,10 +35,10 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
35
  "I'm having problems at home",
36
  "I am looking for some resources",
37
  ],
38
- inputs=message
39
  )
40
 
41
- send.click(respond, [message, chatbot], [message, chatbot])
42
  clear.click(lambda: None, None, chatbot, queue=False)
43
 
44
 
 
16
  )
17
 
18
  chatbot = gr.Chatbot()
19
+ chat_message = gr.Textbox(label="What would you like to chat about?")
20
  response = gr.Textbox
21
 
22
+ def respond(chat_message, chat_history):
23
+ response = get_chain(chat_message, chat_history)
24
+ chat_history.append((chat_message, response))
25
  return "", chat_history
26
 
27
 
 
35
  "I'm having problems at home",
36
  "I am looking for some resources",
37
  ],
38
+ inputs=chat_message
39
  )
40
 
41
+ send.click(respond, [chat_message, chatbot], [chat_message, chatbot])
42
  clear.click(lambda: None, None, chatbot, queue=False)
43
 
44