Update app.py
Browse files
app.py
CHANGED
@@ -63,8 +63,8 @@ def commit(hf_token, repo):
|
|
63 |
liste = [CommitOperationAdd(path_in_repo="README.md", path_or_fileobj=readme_text.encode())]
|
64 |
commit = (create_commit(repo_id=repo, operations=liste, commit_message=f"Adding Evaluation Results", commit_description=desc, repo_type="model", create_pr=True).__dict__['pr_url'])
|
65 |
return commit
|
66 |
-
except: # unexpected error
|
67 |
-
return
|
68 |
|
69 |
|
70 |
demo = gr.Interface(fn=commit, inputs=["text", "text"], outputs="text")
|
|
|
63 |
liste = [CommitOperationAdd(path_in_repo="README.md", path_or_fileobj=readme_text.encode())]
|
64 |
commit = (create_commit(repo_id=repo, operations=liste, commit_message=f"Adding Evaluation Results", commit_description=desc, repo_type="model", create_pr=True).__dict__['pr_url'])
|
65 |
return commit
|
66 |
+
except Exception as e: # unexpected error
|
67 |
+
return e
|
68 |
|
69 |
|
70 |
demo = gr.Interface(fn=commit, inputs=["text", "text"], outputs="text")
|