Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -121,7 +121,7 @@ seed_slider = gr.Slider(
|
|
| 121 |
label="Seed (-1 for random)"
|
| 122 |
)
|
| 123 |
|
| 124 |
-
#
|
| 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,
|
| 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 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 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",
|