Spaces:
Runtime error
Runtime error
vodkaslime
commited on
login before downloading model
Browse files
app.py
CHANGED
@@ -66,6 +66,9 @@ def convert_and_upload_model(
|
|
66 |
if prompt_template:
|
67 |
command += ["--prompt_template", prompt_template]
|
68 |
|
|
|
|
|
|
|
69 |
# Handle model conversion
|
70 |
try:
|
71 |
with st.spinner("Converting model"):
|
@@ -79,7 +82,6 @@ def convert_and_upload_model(
|
|
79 |
# Handle model upload
|
80 |
try:
|
81 |
with st.spinner("Uploading converted model"):
|
82 |
-
huggingface_hub.login(huggingface_token)
|
83 |
api = huggingface_hub.HfApi()
|
84 |
if upload_mode == "new repo":
|
85 |
api.create_repo(new_model)
|
|
|
66 |
if prompt_template:
|
67 |
command += ["--prompt_template", prompt_template]
|
68 |
|
69 |
+
# Login on behalf of user
|
70 |
+
huggingface_hub.login(huggingface_token)
|
71 |
+
|
72 |
# Handle model conversion
|
73 |
try:
|
74 |
with st.spinner("Converting model"):
|
|
|
82 |
# Handle model upload
|
83 |
try:
|
84 |
with st.spinner("Uploading converted model"):
|
|
|
85 |
api = huggingface_hub.HfApi()
|
86 |
if upload_mode == "new repo":
|
87 |
api.create_repo(new_model)
|