Spaces:
Paused
Paused
Clémentine
commited on
Commit
•
ef627e9
1
Parent(s):
9977ce1
removed default value for model type
Browse files
app.py
CHANGED
@@ -183,6 +183,9 @@ def add_new_eval(
|
|
183 |
precision = precision.split(" ")[0]
|
184 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
185 |
|
|
|
|
|
|
|
186 |
# check the model actually exists before adding the eval
|
187 |
if revision == "":
|
188 |
revision = "main"
|
@@ -404,7 +407,7 @@ with demo:
|
|
404 |
choices=["pretrained", "fine-tuned", "with RL"],
|
405 |
label="Model type",
|
406 |
multiselect=False,
|
407 |
-
value=
|
408 |
interactive=True,
|
409 |
)
|
410 |
|
|
|
183 |
precision = precision.split(" ")[0]
|
184 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
185 |
|
186 |
+
if model_type is None or model_type == "":
|
187 |
+
return styled_error("Please select a model type.")
|
188 |
+
|
189 |
# check the model actually exists before adding the eval
|
190 |
if revision == "":
|
191 |
revision = "main"
|
|
|
407 |
choices=["pretrained", "fine-tuned", "with RL"],
|
408 |
label="Model type",
|
409 |
multiselect=False,
|
410 |
+
value=None,
|
411 |
interactive=True,
|
412 |
)
|
413 |
|