AashitaK commited on
Commit
5b4dbe0
·
verified ·
1 Parent(s): c95a36d

Update utils/chatbot_interface_test.py

Browse files
Files changed (1) hide show
  1. utils/chatbot_interface_test.py +11 -4
utils/chatbot_interface_test.py CHANGED
@@ -119,7 +119,14 @@ class ChatbotInterface:
119
  variant="primary",
120
  elem_id="ask-button"
121
  )
122
-
 
 
 
 
 
 
 
123
  # Define a local function to process input:
124
  def process_input(user_message, chat_history):
125
  """
@@ -131,9 +138,9 @@ class ChatbotInterface:
131
 
132
  # Bind the submit button click to the processing function.
133
  submit.click(
134
- fn=process_input,
135
- inputs=[user_input, chatbot_output],
136
- outputs=[chatbot_output, user_input]
137
  )
138
  # Bind the Enter key (textbox submit) to the same processing function.
139
  user_input.submit(
 
119
  variant="primary",
120
  elem_id="ask-button"
121
  )
122
+
123
+ def reset_output() -> list:
124
+ """
125
+ Reset the chatbot output.
126
+ :return: An empty list to reset the output.
127
+ """
128
+ return []
129
+
130
  # Define a local function to process input:
131
  def process_input(user_message, chat_history):
132
  """
 
138
 
139
  # Bind the submit button click to the processing function.
140
  submit.click(
141
+ fn=reset_output,
142
+ inputs=None,#[user_input, chatbot_output],
143
+ outputs="", ""#[chatbot_output, user_input]
144
  )
145
  # Bind the Enter key (textbox submit) to the same processing function.
146
  user_input.submit(