Spaces:
Sleeping
Sleeping
Update player.py
Browse files
player.py
CHANGED
@@ -40,6 +40,12 @@ def load_vid(channel):
|
|
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)
|
|
|
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 |
+
if vid_file.endswith(".mp4"):
|
44 |
+
out_html=f'{out_html}
|
45 |
+
<video width="320" height="240" controls>
|
46 |
+
<source src="https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/resolve/main/videos/{vid_file}" type="video/mp4">
|
47 |
+
Your browser does not support the video tag.
|
48 |
+
</video>'
|
49 |
#uid = uuid.uuid4()
|
50 |
#file = open(f'{name}/{f_name}','wb')
|
51 |
#file.write(r.content)
|