Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ api = HfApi()
|
|
9 |
REPO_TYPES = ["model", "dataset", "space"]
|
10 |
|
11 |
def upload_model(source_url, dst_repo, token,civitai_api_key, new_name, dst_repo_path, repo_type):
|
12 |
-
try:
|
13 |
_ = whoami(token) # Check token validity
|
14 |
|
15 |
# Check if destination path ends with '/'
|
@@ -70,8 +69,6 @@ def upload_model(source_url, dst_repo, token,civitai_api_key, new_name, dst_repo
|
|
70 |
"success.jpg",
|
71 |
)
|
72 |
|
73 |
-
except Exception as e:
|
74 |
-
return gr.Error(f"{e}")
|
75 |
|
76 |
# Interface setup
|
77 |
interface = gr.Interface(
|
|
|
9 |
REPO_TYPES = ["model", "dataset", "space"]
|
10 |
|
11 |
def upload_model(source_url, dst_repo, token,civitai_api_key, new_name, dst_repo_path, repo_type):
|
|
|
12 |
_ = whoami(token) # Check token validity
|
13 |
|
14 |
# Check if destination path ends with '/'
|
|
|
69 |
"success.jpg",
|
70 |
)
|
71 |
|
|
|
|
|
72 |
|
73 |
# Interface setup
|
74 |
interface = gr.Interface(
|