Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -656,7 +656,7 @@ def process_feedback(ease, clarity, engagement, satisfaction, cognitive_load, us
|
|
| 656 |
# Chat Flow
|
| 657 |
#############################################################################
|
| 658 |
|
| 659 |
-
def new_chat_input(chat_history, user_state, user_input,
|
| 660 |
|
| 661 |
if attribution_slider is None:
|
| 662 |
|
|
@@ -1682,7 +1682,7 @@ with gr.Blocks(theme= gr.themes.Glass(), css=css) as app:
|
|
| 1682 |
# Submit handler for text input
|
| 1683 |
user_message.submit(
|
| 1684 |
fn=new_chat_input,
|
| 1685 |
-
inputs=[chatbot, user_state, user_message
|
| 1686 |
outputs=[chatbot, user_state, user_message, attribution_slider, confirm_button],
|
| 1687 |
queue=False
|
| 1688 |
)
|
|
@@ -1690,7 +1690,7 @@ with gr.Blocks(theme= gr.themes.Glass(), css=css) as app:
|
|
| 1690 |
# Confirm handler for slider
|
| 1691 |
confirm_button.click(
|
| 1692 |
fn=new_chat_input,
|
| 1693 |
-
inputs=[chatbot, user_state, user_message
|
| 1694 |
outputs=[chatbot, user_state, user_message, attribution_slider, confirm_button],
|
| 1695 |
queue=False
|
| 1696 |
)
|
|
|
|
| 656 |
# Chat Flow
|
| 657 |
#############################################################################
|
| 658 |
|
| 659 |
+
def new_chat_input(chat_history, user_state, user_input, *args, **kwargs):
|
| 660 |
|
| 661 |
if attribution_slider is None:
|
| 662 |
|
|
|
|
| 1682 |
# Submit handler for text input
|
| 1683 |
user_message.submit(
|
| 1684 |
fn=new_chat_input,
|
| 1685 |
+
inputs=[chatbot, user_state, user_message],
|
| 1686 |
outputs=[chatbot, user_state, user_message, attribution_slider, confirm_button],
|
| 1687 |
queue=False
|
| 1688 |
)
|
|
|
|
| 1690 |
# Confirm handler for slider
|
| 1691 |
confirm_button.click(
|
| 1692 |
fn=new_chat_input,
|
| 1693 |
+
inputs=[chatbot, user_state, user_message],
|
| 1694 |
outputs=[chatbot, user_state, user_message, attribution_slider, confirm_button],
|
| 1695 |
queue=False
|
| 1696 |
)
|