Update app.py
Browse files
app.py
CHANGED
@@ -181,6 +181,10 @@ import gradio as gr
|
|
181 |
# ---- Gradio App Setup ----
|
182 |
auth = ("Tej", "186281mps", "ACC", "HIPE")
|
183 |
|
|
|
|
|
|
|
|
|
184 |
with gr.Blocks() as app:
|
185 |
# Header section
|
186 |
gr.Markdown("# **Autistic Assistant vß Edition 2024 Ultra: Gertrude's Autistic Experience**")
|
@@ -314,14 +318,10 @@ with gr.Blocks() as app:
|
|
314 |
response = advanced_agi_chat(user_input)
|
315 |
return response
|
316 |
|
317 |
-
|
318 |
-
# Just simulate the click animation and do nothing else
|
319 |
-
return gr.update(interactive=True, elem_id="chatbot_output")
|
320 |
-
|
321 |
-
# Set the button click events with animations
|
322 |
submit_button.click(chat_interface, inputs=user_input, outputs=chatbot)
|
323 |
-
pain_button.click(simulate_button_click, inputs=
|
324 |
-
pleasure_button.click(simulate_button_click, inputs=
|
325 |
|
326 |
# Launch the Gradio app
|
327 |
app.launch()
|
|
|
181 |
# ---- Gradio App Setup ----
|
182 |
auth = ("Tej", "186281mps", "ACC", "HIPE")
|
183 |
|
184 |
+
def simulate_button_click(button_type):
|
185 |
+
# Just simulate the click animation and do nothing else
|
186 |
+
return gr.update(interactive=True, elem_id="chatbot_output")
|
187 |
+
|
188 |
with gr.Blocks() as app:
|
189 |
# Header section
|
190 |
gr.Markdown("# **Autistic Assistant vß Edition 2024 Ultra: Gertrude's Autistic Experience**")
|
|
|
318 |
response = advanced_agi_chat(user_input)
|
319 |
return response
|
320 |
|
321 |
+
# Now we pass the actual button components as inputs
|
|
|
|
|
|
|
|
|
322 |
submit_button.click(chat_interface, inputs=user_input, outputs=chatbot)
|
323 |
+
pain_button.click(simulate_button_click, inputs=pain_button, outputs=chatbot)
|
324 |
+
pleasure_button.click(simulate_button_click, inputs=pleasure_button, outputs=chatbot)
|
325 |
|
326 |
# Launch the Gradio app
|
327 |
app.launch()
|