Nymbo commited on
Commit
3f8952c
·
verified ·
1 Parent(s): 7a4f867

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -58,8 +58,7 @@ def respond(
58
  messages.append({"role": "user", "content": message})
59
  print("Latest user message appended.")
60
 
61
- # Determine which model to use
62
- # Only use custom_model if it's not empty and was manually entered by user
63
  model_to_use = custom_model.strip() if custom_model.strip() != "" else selected_model
64
  print(f"Model selected for inference: {model_to_use}")
65
 
@@ -235,11 +234,11 @@ def filter_models(search_term):
235
 
236
  def set_custom_model_from_radio(selected):
237
  """
238
- Function is disabled - now just returns empty string to prevent auto-filling
239
- Custom Model field when selecting from the radio buttons
240
  """
241
  print(f"Featured model selected: {selected}")
242
- return "" # Return empty string instead of the selected model
243
 
244
  # Create the Gradio interface
245
  demo = gr.ChatInterface(
 
58
  messages.append({"role": "user", "content": message})
59
  print("Latest user message appended.")
60
 
61
+ # Determine which model to use, prioritizing custom_model if provided
 
62
  model_to_use = custom_model.strip() if custom_model.strip() != "" else selected_model
63
  print(f"Model selected for inference: {model_to_use}")
64
 
 
234
 
235
  def set_custom_model_from_radio(selected):
236
  """
237
+ This function will no longer update the custom model box.
238
+ Instead, we just return an empty string to ensure the custom model remains empty.
239
  """
240
  print(f"Featured model selected: {selected}")
241
+ return "" # Return empty string to keep custom model box empty
242
 
243
  # Create the Gradio interface
244
  demo = gr.ChatInterface(