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