patti-j commited on
Commit
bfc8030
1 Parent(s): 100a421

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -3,19 +3,20 @@ import gradio as gr
3
  gr.HTML("Omdena AI Chatbot For Mental Health and Well Being")
4
 
5
 
6
- class ChatWrapper:
7
 
8
  def __call__(
9
  self, inp: str, history: str, chain
10
  ):
11
- """Execute the chat functionality."""
12
  output = chain({"question": inp, "chat_history": history})["answer"]
13
  history.append((inp, output))
14
  return history, history
15
 
16
- chatbot = gr.Chatbot()
17
 
18
- chat = ChatWrapper()
 
 
19
 
20
  block = gr.Blocks(css=".gradio-container {background-color: gray}")
21
 
@@ -41,6 +42,6 @@ with block:
41
  inputs=message,
42
  )
43
 
44
- submit.click(chat, inputs=[message], outputs=[chatbot])
45
 
46
  block.launch(debug=True)
 
3
  gr.HTML("Omdena AI Chatbot For Mental Health and Well Being")
4
 
5
 
6
+ """class ChatWrapper:
7
 
8
  def __call__(
9
  self, inp: str, history: str, chain
10
  ):
11
+ Execute the chat functionality.
12
  output = chain({"question": inp, "chat_history": history})["answer"]
13
  history.append((inp, output))
14
  return history, history
15
 
 
16
 
17
+ chat = ChatWrapper()"""
18
+
19
+ chatbot = gr.Chatbot()
20
 
21
  block = gr.Blocks(css=".gradio-container {background-color: gray}")
22
 
 
42
  inputs=message,
43
  )
44
 
45
+ /* submit.click(chat, inputs=[message], outputs=[chatbot])
46
 
47
  block.launch(debug=True)