Spaces:
Running
Running
Update dl.py
Browse files
dl.py
CHANGED
@@ -65,7 +65,7 @@ def show_f(repo,name,token):
|
|
65 |
pf=d_app.split(".",1)[0]
|
66 |
f_name=f'{pf}.{sf}'
|
67 |
pass
|
68 |
-
|
69 |
#numbers = [x for x in images if img in f_name]
|
70 |
img_tog=False
|
71 |
for img in images:
|
@@ -85,19 +85,15 @@ def show_f(repo,name,token):
|
|
85 |
else:
|
86 |
pass
|
87 |
if img_tog == False:
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
#file.writelines(r.text)
|
98 |
-
#file.close()
|
99 |
-
file_list.append(Path(f'{name}/{f_name}'))
|
100 |
-
#file_out.append(d_app)
|
101 |
|
102 |
with ZipFile(f"{name}.zip", "w") as zipObj:
|
103 |
for idx, file in enumerate(f_ist):
|
|
|
65 |
pf=d_app.split(".",1)[0]
|
66 |
f_name=f'{pf}.{sf}'
|
67 |
pass
|
68 |
+
'''
|
69 |
#numbers = [x for x in images if img in f_name]
|
70 |
img_tog=False
|
71 |
for img in images:
|
|
|
85 |
else:
|
86 |
pass
|
87 |
if img_tog == False:
|
88 |
+
'''
|
89 |
+
r = requests.get(f'https://huggingface.co/spaces/{repo}/{name}/raw/main/{d_app}')
|
90 |
+
print(d_app)
|
91 |
+
#print (r.text)
|
92 |
+
uid = uuid.uuid4()
|
93 |
+
file = open(f'{name}/{f_name}','wb')
|
94 |
+
file.write(r.content)
|
95 |
+
file.close()
|
96 |
+
file_list.append(Path(f'{name}/{f_name}'))
|
|
|
|
|
|
|
|
|
97 |
|
98 |
with ZipFile(f"{name}.zip", "w") as zipObj:
|
99 |
for idx, file in enumerate(f_ist):
|