patti-j commited on
Commit
ad27618
1 Parent(s): 6272e9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -2
app.py CHANGED
@@ -2,5 +2,30 @@ import gradio as gr
2
 
3
  gr.HTML("Omdena AI Chatbot For Mental Health and Well Being")
4
 
5
- iface = gr.Interface(fn=response.py, inputs="text", outputs="text")
6
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  gr.HTML("Omdena AI Chatbot For Mental Health and Well Being")
4
 
5
+ chatbot = gr.Chatbot()
6
+ chat = ChatWrapper()
7
+
8
+ block = gr.Blocks(css=".gradio-container {background-color: gray}")
9
+
10
+ with block:
11
+ with gr.Row():
12
+ message = gr.Textbox(
13
+ label="I am an AI ChatBot and I am here to assist you with whatever is bothering you.
14
+ Our conversation is strictly confidential and I will not remember it when you come back another time.
15
+ What would you like to talk about?",
16
+ placeholder="Ask questions about the most recent state of the union",
17
+ lines=1,
18
+ )
19
+ submit = gr.Button(value="Send", variant="secondary").style(full_width=False)
20
+
21
+ gr.Examples(
22
+ examples=[
23
+ "I'm having problems at home",
24
+ "I am jumpy when I hear a loud noise and I feel scared all the time",
25
+ ],
26
+ inputs=message,
27
+ )
28
+
29
+ submit.click(chat, inputs=[message], outputs=[chatbot])
30
+
31
+ block.launch(debug=True)