mannadamay12 commited on
Commit
2b2ec83
·
verified ·
1 Parent(s): d6a5c7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -102,9 +102,10 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
102
  history.append((message, f"An error occurred: {str(e)}"))
103
  return history
104
 
 
105
  def submit_and_clear(message, history, system_message, max_tokens, temperature, top_p):
106
  new_history = respond(message, history, system_message, max_tokens, temperature, top_p)
107
- return new_history, gr.Textbox.update(value="")
108
 
109
  with gr.Blocks(title="ROS2 Expert Assistant") as demo:
110
  gr.Markdown("# ROS2 Expert Assistant")
 
102
  history.append((message, f"An error occurred: {str(e)}"))
103
  return history
104
 
105
+
106
  def submit_and_clear(message, history, system_message, max_tokens, temperature, top_p):
107
  new_history = respond(message, history, system_message, max_tokens, temperature, top_p)
108
+ return new_history, ""
109
 
110
  with gr.Blocks(title="ROS2 Expert Assistant") as demo:
111
  gr.Markdown("# ROS2 Expert Assistant")