Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def respond(
|
|
54 |
print("Latest user message appended.")
|
55 |
|
56 |
# If user provided a model, use that; otherwise, fall back to a default model
|
57 |
-
model_to_use = custom_model.strip() if custom_model.strip() != "" else "meta-llama/Llama-3.
|
58 |
print(f"Model selected for inference: {model_to_use}")
|
59 |
|
60 |
# Start with an empty string to build the response as tokens stream in
|
@@ -123,10 +123,10 @@ seed_slider = gr.Slider(
|
|
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",
|
128 |
info="(Optional) Provide a custom Hugging Face model path. Overrides any selected featured model.",
|
129 |
-
placeholder="meta-llama/Llama-3.
|
130 |
)
|
131 |
|
132 |
def set_custom_model_from_radio(selected):
|
@@ -196,8 +196,8 @@ with demo:
|
|
196 |
featured_model_radio = gr.Radio(
|
197 |
label="Select a model below",
|
198 |
choices=models_list,
|
199 |
-
value="meta-llama/Llama-3.
|
200 |
-
interactive=
|
201 |
)
|
202 |
print("Featured models radio button created.")
|
203 |
|
|
|
54 |
print("Latest user message appended.")
|
55 |
|
56 |
# If user provided a model, use that; otherwise, fall back to a default model
|
57 |
+
model_to_use = custom_model.strip() if custom_model.strip() != "" else "meta-llama/Llama-3.1-8B-Instruct"
|
58 |
print(f"Model selected for inference: {model_to_use}")
|
59 |
|
60 |
# Start with an empty string to build the response as tokens stream in
|
|
|
123 |
|
124 |
# The custom_model_box is what the respond function sees as "custom_model"
|
125 |
custom_model_box = gr.Textbox(
|
126 |
+
value="meta-llama/Llama-3.2-3B-Instruct",
|
127 |
label="Custom Model",
|
128 |
info="(Optional) Provide a custom Hugging Face model path. Overrides any selected featured model.",
|
129 |
+
placeholder="meta-llama/Llama-3.2-3B-Instruct"
|
130 |
)
|
131 |
|
132 |
def set_custom_model_from_radio(selected):
|
|
|
196 |
featured_model_radio = gr.Radio(
|
197 |
label="Select a model below",
|
198 |
choices=models_list,
|
199 |
+
value="meta-llama/Llama-3.2-3B-Instruct",
|
200 |
+
interactive=False
|
201 |
)
|
202 |
print("Featured models radio button created.")
|
203 |
|