print the models
Browse files- functions.py +4 -1
functions.py
CHANGED
@@ -175,10 +175,13 @@ def commit(repo, pr_number=None, message="Adding Evaluation Results", oauth_toke
|
|
175 |
liste = [CommitOperationAdd(path_in_repo="README.md", path_or_fileobj=readme_text.encode())]
|
176 |
commit = (create_commit(repo_id=repo, token=token, operations=liste, commit_message=message, commit_description=desc, repo_type="model", **edited).pr_url)
|
177 |
|
|
|
|
|
178 |
return commit
|
179 |
|
180 |
except Exception as e:
|
181 |
-
|
|
|
182 |
if "Discussions are disabled for this repo" in str(e):
|
183 |
return "Discussions disabled"
|
184 |
elif "Cannot access gated repo" in str(e):
|
|
|
175 |
liste = [CommitOperationAdd(path_in_repo="README.md", path_or_fileobj=readme_text.encode())]
|
176 |
commit = (create_commit(repo_id=repo, token=token, operations=liste, commit_message=message, commit_description=desc, repo_type="model", **edited).pr_url)
|
177 |
|
178 |
+
print(f"Success: {repo}")
|
179 |
+
|
180 |
return commit
|
181 |
|
182 |
except Exception as e:
|
183 |
+
print(f"Error: {repo}")
|
184 |
+
|
185 |
if "Discussions are disabled for this repo" in str(e):
|
186 |
return "Discussions disabled"
|
187 |
elif "Cannot access gated repo" in str(e):
|