Spaces:
Sleeping
Sleeping
Update player.py
Browse files
player.py
CHANGED
@@ -33,22 +33,19 @@ def load_vid(channel):
|
|
33 |
vid_slug=vid_file.split("videos/",1)[1].split(".",1)[0]
|
34 |
print(vid_slug)
|
35 |
try:
|
36 |
-
if
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
#uid = uuid.uuid4()
|
41 |
#file = open(f'{name}/{f_name}','wb')
|
42 |
#file.write(r.content)
|
43 |
except Exception as e:
|
44 |
print (f'error:: {e}')
|
45 |
pass
|
46 |
-
try:
|
47 |
-
if vid_slug == prompt_slug:
|
48 |
-
out_html=f'{out_html}<pre> + {vid_file}</pre>'
|
49 |
-
|
50 |
-
except Exception:
|
51 |
-
pass
|
52 |
except Exception:
|
53 |
pass
|
54 |
except Exception as e:
|
|
|
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>'
|
38 |
+
|
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.content)
|
43 |
#uid = uuid.uuid4()
|
44 |
#file = open(f'{name}/{f_name}','wb')
|
45 |
#file.write(r.content)
|
46 |
except Exception as e:
|
47 |
print (f'error:: {e}')
|
48 |
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
except Exception:
|
50 |
pass
|
51 |
except Exception as e:
|