Spaces:
Runtime error
Runtime error
import gradio as gr | |
gr.HTML("Omdena AI Chatbot For Mental Health and Well Being") | |
chatbot = gr.Chatbot() | |
chat = ChatWrapper() | |
block = gr.Blocks(css=".gradio-container {background-color: gray}") | |
with block: | |
with gr.Row(): | |
message = gr.Textbox( | |
label="I am an AI ChatBot and I am here to assist you with whatever is bothering you. | |
Our conversation is strictly confidential and I will not remember it when you come back another time. | |
What would you like to talk about?", | |
placeholder="Ask questions about the most recent state of the union", | |
lines=1, | |
) | |
submit = gr.Button(value="Send", variant="secondary").style(full_width=False) | |
gr.Examples( | |
examples=[ | |
"I'm having problems at home", | |
"I am jumpy when I hear a loud noise and I feel scared all the time", | |
], | |
inputs=message, | |
) | |
submit.click(chat, inputs=[message], outputs=[chatbot]) | |
block.launch(debug=True) |