VanYsa commited on
Commit
a2da9cb
·
1 Parent(s): 5d8ed55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -135,7 +135,7 @@ def bot(history,message):
135
  def bot_response(message):
136
  """
137
  Generates a response from the LLM model.
138
- Temperature and top_p are set to 0.6 and 0.9 respectively.
139
  """
140
  messages = [
141
  {"role": "system", "content": "You are a helpful AI assistant."},
@@ -219,10 +219,9 @@ with gr.Blocks(
219
  components=[chatbot],
220
  value="Clear chat",
221
  )
222
- if chat_input.value != "":
223
- chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot, chat_input])
224
  bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
225
- bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
226
 
227
  submit_button.click(
228
  fn=transcribe,
 
135
  def bot_response(message):
136
  """
137
  Generates a response from the LLM model.
138
+ max_new_tokens, temperature and top_p are set to 512, 0.6 and 0.9 respectively.
139
  """
140
  messages = [
141
  {"role": "system", "content": "You are a helpful AI assistant."},
 
219
  components=[chatbot],
220
  value="Clear chat",
221
  )
222
+ chat_msg = chat_input.change(add_message, [chatbot, chat_input], [chatbot, chat_input])
 
223
  bot_msg = chat_msg.then(bot, [chatbot, chat_input], chatbot, api_name="bot_response")
224
+ # bot_msg.then(lambda: gr.Textbox(interactive=False), None, [chat_input])
225
 
226
  submit_button.click(
227
  fn=transcribe,