Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,13 +84,15 @@ def upload_gitRepository():
|
|
| 84 |
print(f"Archive Bytes: {repr(archive_bytes.getvalue())[:100]}") # Show a preview of bytes
|
| 85 |
print(f"Target Path in Repo: '{target_path}'")
|
| 86 |
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
|
|
|
| 92 |
)
|
| 93 |
-
|
| 94 |
|
| 95 |
|
| 96 |
def process_directory(directory):
|
|
|
|
| 84 |
print(f"Archive Bytes: {repr(archive_bytes.getvalue())[:100]}") # Show a preview of bytes
|
| 85 |
print(f"Target Path in Repo: '{target_path}'")
|
| 86 |
|
| 87 |
+
api.upload_file(
|
| 88 |
+
path_or_fileobj=archive_bytes,
|
| 89 |
+
path_in_repo=target_path,
|
| 90 |
+
repo_id=HF_SPACE_NAME,
|
| 91 |
+
repo_type='space'
|
| 92 |
+
|
| 93 |
+
print("Upload complete")
|
| 94 |
)
|
| 95 |
+
|
| 96 |
|
| 97 |
|
| 98 |
def process_directory(directory):
|