Spaces:
Sleeping
Sleeping
Update download_repo.py
Browse files- download_repo.py +6 -6
download_repo.py
CHANGED
@@ -47,9 +47,9 @@ def download_gitlab_repo_to_hfspace(api_url, project_id, version, target_folder)
|
|
47 |
def _upload_file_to_hfspace(response, api, target_path, HF_SPACE_NAME):
|
48 |
archive_bytes = io.BytesIO(response.content)
|
49 |
# Extract filename from content-disposition header
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
47 |
def _upload_file_to_hfspace(response, api, target_path, HF_SPACE_NAME):
|
48 |
archive_bytes = io.BytesIO(response.content)
|
49 |
# Extract filename from content-disposition header
|
50 |
+
api.upload_file(
|
51 |
+
path_or_fileobj=archive_bytes,
|
52 |
+
path_in_repo= target_path,
|
53 |
+
repo_id=HF_SPACE_NAME,
|
54 |
+
repo_type="space"
|
55 |
+
)
|