admin08077 commited on
Commit
a5afa45
·
verified ·
1 Parent(s): f883ad2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -122,7 +122,15 @@ Uploaded file content will provide context for the conversation.
122
  history[-1] = (user_message, assistant_response)
123
  return "", history
124
 
125
- # Submit Chat Input
 
 
 
 
 
 
 
 
126
  user_input.submit(
127
  fn=chat_function,
128
  inputs=[user_input, chat_history_state, file_content_state, system_prompt, max_tokens, temperature, top_p],
 
122
  history[-1] = (user_message, assistant_response)
123
  return "", history
124
 
125
+ # Add a Send Button for manual submission
126
+ send_button = gr.Button("Send")
127
+ send_button.click(
128
+ fn=chat_function,
129
+ inputs=[user_input, chat_history_state, file_content_state, system_prompt, max_tokens, temperature, top_p],
130
+ outputs=[user_input, chatbot]
131
+ )
132
+
133
+ # Submit Chat Input with Enter Key as well
134
  user_input.submit(
135
  fn=chat_function,
136
  inputs=[user_input, chat_history_state, file_content_state, system_prompt, max_tokens, temperature, top_p],