Spaces:
Sleeping
Sleeping
Update player.py
Browse files
player.py
CHANGED
@@ -26,23 +26,26 @@ def find_dataset(author=None):
|
|
26 |
out_html=f'{out_html}<pre> • {file}</pre>'
|
27 |
print(prompt_slug)
|
28 |
for vid_file in ai_tube_box:
|
29 |
-
vid_slug=vid_file.split("videos/",1)[1].split(".",1)[0]
|
30 |
-
print(vid_slug)
|
31 |
try:
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
46 |
except Exception:
|
47 |
pass
|
48 |
|
|
|
26 |
out_html=f'{out_html}<pre> • {file}</pre>'
|
27 |
print(prompt_slug)
|
28 |
for vid_file in ai_tube_box:
|
|
|
|
|
29 |
try:
|
30 |
+
vid_slug=vid_file.split("videos/",1)[1].split(".",1)[0]
|
31 |
+
print(vid_slug)
|
32 |
+
try:
|
33 |
+
if vid_file.endswith(".json"):
|
34 |
+
r = requests.get(f'https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/raw/main/videos/{vid_slug}.json')
|
35 |
+
#r = requests.get(f'https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/blob/main/videos/00b4bcda-7b4a-40f8-9833-e490425a7b91.mp4')
|
36 |
+
print (r.content)
|
37 |
+
#uid = uuid.uuid4()
|
38 |
+
#file = open(f'{name}/{f_name}','wb')
|
39 |
+
#file.write(r.content)
|
40 |
+
except Exception as e:
|
41 |
+
print (f'error:: {e}')
|
42 |
+
pass
|
43 |
+
try:
|
44 |
+
if vid_slug == prompt_slug:
|
45 |
+
out_html=f'{out_html}<pre> + {vid_file}</pre>'
|
46 |
+
|
47 |
+
except Exception:
|
48 |
+
pass
|
49 |
except Exception:
|
50 |
pass
|
51 |
|