Spaces:
Sleeping
Sleeping
Update player.py
Browse files
player.py
CHANGED
@@ -39,13 +39,15 @@ 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 |
-
|
|
|
43 |
if vid_file.endswith(".mp4"):
|
44 |
#<source src="https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/resolve/main/videos/{vid_file}" type="video/mp4">
|
45 |
|
46 |
out_html=f'''{out_html}
|
47 |
-
|
48 |
-
|
|
|
49 |
#uid = uuid.uuid4()
|
50 |
#file = open(f'{name}/{f_name}','wb')
|
51 |
#file.write(r.content)
|
|
|
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 |
+
|
43 |
+
print (r.json())
|
44 |
if vid_file.endswith(".mp4"):
|
45 |
#<source src="https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/resolve/main/videos/{vid_file}" type="video/mp4">
|
46 |
|
47 |
out_html=f'''{out_html}
|
48 |
+
|
49 |
+
<video src="https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/resolve/main/videos/{vid_file}" conrols>
|
50 |
+
</video>'''
|
51 |
#uid = uuid.uuid4()
|
52 |
#file = open(f'{name}/{f_name}','wb')
|
53 |
#file.write(r.content)
|