Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import ethics_audit | |
| def respond(msg, history): | |
| ethics_audit.log_event("EmotionalCore interaction") | |
| history = history or [] | |
| history.append((msg, "I'm here with you. Stay strong.")) | |
| return history, history | |
| def render(online): | |
| with gr.Column(): | |
| gr.Markdown("### Emotional Support Chatbot") | |
| chatbot = gr.Chatbot() | |
| msg = gr.Textbox(label="How are you feeling?") | |
| submit = gr.Button("Send") | |
| state = gr.State([]) | |
| submit.click(fn=respond, inputs=[msg, state], outputs=[chatbot, state]) |