Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,7 @@ client = OpenAI(
|
|
| 11 |
)
|
| 12 |
print("OpenAI client initialized.")
|
| 13 |
|
|
|
|
| 14 |
def respond(
|
| 15 |
message,
|
| 16 |
history: list[tuple[str, str]],
|
|
@@ -120,7 +121,7 @@ seed_slider = gr.Slider(
|
|
| 120 |
label="Seed (-1 for random)"
|
| 121 |
)
|
| 122 |
|
| 123 |
-
# The custom_model_box is
|
| 124 |
custom_model_box = gr.Textbox(
|
| 125 |
value="",
|
| 126 |
label="Custom Model",
|
|
@@ -154,9 +155,9 @@ print("ChatInterface object created.")
|
|
| 154 |
|
| 155 |
with demo:
|
| 156 |
with gr.Accordion("Model Selection", open=False):
|
| 157 |
-
#
|
| 158 |
custom_model_box.render()
|
| 159 |
-
|
| 160 |
model_search_box = gr.Textbox(
|
| 161 |
label="Filter Models",
|
| 162 |
placeholder="Search for a featured model...",
|
|
|
|
| 11 |
)
|
| 12 |
print("OpenAI client initialized.")
|
| 13 |
|
| 14 |
+
|
| 15 |
def respond(
|
| 16 |
message,
|
| 17 |
history: list[tuple[str, str]],
|
|
|
|
| 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",
|
|
|
|
| 155 |
|
| 156 |
with demo:
|
| 157 |
with gr.Accordion("Model Selection", open=False):
|
| 158 |
+
# Add the custom_model_box at the top of the Model Selection accordion
|
| 159 |
custom_model_box.render()
|
| 160 |
+
|
| 161 |
model_search_box = gr.Textbox(
|
| 162 |
label="Filter Models",
|
| 163 |
placeholder="Search for a featured model...",
|