elfsong commited on
Commit
6cd0f07
·
1 Parent(s): 417d37b

refactor: Update bot_response function to restore input box availability and clear content for improved user interaction.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def bot_response(user_message, history, model_name, system_message, max_tokens,
53
  history[-1]["content"] = f"**Error:** {str(e)}"
54
 
55
  # --- Final Yield: Restore input box availability and clear content ---
56
- yield history, ""
57
 
58
  with gr.Blocks() as demo:
59
  with gr.Sidebar():
 
53
  history[-1]["content"] = f"**Error:** {str(e)}"
54
 
55
  # --- Final Yield: Restore input box availability and clear content ---
56
+ yield history, gr.update(value="", interactive=True)
57
 
58
  with gr.Blocks() as demo:
59
  with gr.Sidebar():