Omnibus commited on
Commit
a8d228b
1 Parent(s): 32b6e6e

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +10 -14
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
- r = requests.get(f'https://huggingface.co/spaces/{repo}/{name}/raw/main/{d_app}')
89
- print(d_app)
90
- #print (r.text)
91
- uid = uuid.uuid4()
92
- file = open(f'{name}/{f_name}','wb')
93
- file.write(r.content)
94
- file.close()
95
-
96
- #file = open(f'{name}/{f_name}','w')
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):