Fix the commit_id bug
Browse files
app.py
CHANGED
|
@@ -192,12 +192,6 @@ with tab2:
|
|
| 192 |
inference_functions_names,
|
| 193 |
)
|
| 194 |
|
| 195 |
-
if model_name and model_revision:
|
| 196 |
-
# Get the model's commit id
|
| 197 |
-
commit_id = api.list_repo_commits(model_name, revision=model_revision)[
|
| 198 |
-
0
|
| 199 |
-
].commit_id
|
| 200 |
-
|
| 201 |
# Show the docstring of the inference functions
|
| 202 |
inference_functions_docstring = [
|
| 203 |
getattr(eval_utils, func).__doc__ for func in inference_functions_names
|
|
@@ -216,7 +210,12 @@ with tab2:
|
|
| 216 |
"Note: We are happy to discuss adding new custom inference methods for your models."
|
| 217 |
)
|
| 218 |
|
| 219 |
-
if model_name and
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
# Add the model to the evaluation queue
|
| 221 |
utils.update_model_queue(
|
| 222 |
repo_id=os.environ["PREDICTIONS_DATASET_NAME"],
|
|
|
|
| 192 |
inference_functions_names,
|
| 193 |
)
|
| 194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
# Show the docstring of the inference functions
|
| 196 |
inference_functions_docstring = [
|
| 197 |
getattr(eval_utils, func).__doc__ for func in inference_functions_names
|
|
|
|
| 210 |
"Note: We are happy to discuss adding new custom inference methods for your models."
|
| 211 |
)
|
| 212 |
|
| 213 |
+
if model_name and model_revision and inference_function:
|
| 214 |
+
# Get the model's commit id
|
| 215 |
+
commit_id = api.list_repo_commits(model_name, revision=model_revision)[
|
| 216 |
+
0
|
| 217 |
+
].commit_id
|
| 218 |
+
|
| 219 |
# Add the model to the evaluation queue
|
| 220 |
utils.update_model_queue(
|
| 221 |
repo_id=os.environ["PREDICTIONS_DATASET_NAME"],
|