Nymbo commited on
Commit
817474e
·
verified ·
1 Parent(s): b0cbd1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -13
app.py CHANGED
@@ -121,7 +121,7 @@ seed_slider = gr.Slider(
121
  label="Seed (-1 for random)"
122
  )
123
 
124
- # Move the custom_model_box definition to be used inside the accordion
125
  custom_model_box = gr.Textbox(
126
  value="",
127
  label="Custom Model",
@@ -146,7 +146,7 @@ demo = gr.ChatInterface(
146
  top_p_slider,
147
  frequency_penalty_slider,
148
  seed_slider,
149
- custom_model_box, # Keep this reference here for the respond function
150
  ],
151
  fill_height=True,
152
  chatbot=chatbot,
@@ -156,17 +156,12 @@ print("ChatInterface object created.")
156
 
157
  with demo:
158
  with gr.Accordion("Model Selection", open=False):
159
- # Create a row for the search and custom model inputs
160
- with gr.Row():
161
- model_search_box = gr.Textbox(
162
- label="Filter Models",
163
- placeholder="Search for a featured model...",
164
- lines=1,
165
- scale=1 # Equal scaling with custom_model_box
166
- )
167
- # Place the custom model box here, alongside the search box
168
- custom_model_box.render() # Render the previously defined textbox here
169
- print("Model search box and custom model box created.")
170
 
171
  models_list = [
172
  "meta-llama/Llama-3.3-70B-Instruct",
 
121
  label="Seed (-1 for random)"
122
  )
123
 
124
+ # The custom_model_box is what the respond function sees as "custom_model"
125
  custom_model_box = gr.Textbox(
126
  value="",
127
  label="Custom Model",
 
146
  top_p_slider,
147
  frequency_penalty_slider,
148
  seed_slider,
149
+ custom_model_box,
150
  ],
151
  fill_height=True,
152
  chatbot=chatbot,
 
156
 
157
  with demo:
158
  with gr.Accordion("Model Selection", open=False):
159
+ model_search_box = gr.Textbox(
160
+ label="Filter Models",
161
+ placeholder="Search for a featured model...",
162
+ lines=1
163
+ )
164
+ print("Model search box created.")
 
 
 
 
 
165
 
166
  models_list = [
167
  "meta-llama/Llama-3.3-70B-Instruct",