Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,6 +23,15 @@ from torchvision import transforms
|
|
23 |
#from huggingface_hub import Repository
|
24 |
#with Repository(local_dir="clipseg", clone_from="ThereforeGames/txt2mask/repositories/clipseg/")
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
from huggingface_hub import HfApi
|
27 |
api = HfApi()
|
28 |
api.upload_folder(
|
@@ -32,7 +41,7 @@ api.upload_folder(
|
|
32 |
# repo_type="dataset",
|
33 |
# ignore_patterns="**/logs/*.txt",
|
34 |
)
|
35 |
-
|
36 |
#.commit(commit_message="clipseg uploaded...")
|
37 |
# with open("file.txt", "w+") as f:
|
38 |
# f.write(json.dumps({"hey": 8}))
|
|
|
23 |
#from huggingface_hub import Repository
|
24 |
#with Repository(local_dir="clipseg", clone_from="ThereforeGames/txt2mask/repositories/clipseg/")
|
25 |
|
26 |
+
import sys
|
27 |
+
import os
|
28 |
+
|
29 |
+
from zipfile import ZipFile
|
30 |
+
zf = ZipFile('clipseg-master.zip', 'r')
|
31 |
+
zf.extractall('./clipseg')
|
32 |
+
zf.close()
|
33 |
+
|
34 |
+
"""
|
35 |
from huggingface_hub import HfApi
|
36 |
api = HfApi()
|
37 |
api.upload_folder(
|
|
|
41 |
# repo_type="dataset",
|
42 |
# ignore_patterns="**/logs/*.txt",
|
43 |
)
|
44 |
+
"""
|
45 |
#.commit(commit_message="clipseg uploaded...")
|
46 |
# with open("file.txt", "w+") as f:
|
47 |
# f.write(json.dumps({"hey": 8}))
|