Omnibus commited on
Commit
eef3a59
1 Parent(s): 848b379

Update player.py

Browse files
Files changed (1) hide show
  1. player.py +19 -16
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
- if vid_file.endswith(".json"):
33
- r = requests.get(f'https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/raw/main/videos/{vid_slug}.json')
34
- #r = requests.get(f'https://huggingface.co/datasets/jbilcke-hf/ai-tube-index/blob/main/videos/00b4bcda-7b4a-40f8-9833-e490425a7b91.mp4')
35
- print (r.content)
36
- #uid = uuid.uuid4()
37
- #file = open(f'{name}/{f_name}','wb')
38
- #file.write(r.content)
39
- except Exception as e:
40
- print (f'error:: {e}')
41
- pass
42
- try:
43
- if vid_slug == prompt_slug:
44
- out_html=f'{out_html}<pre> + {vid_file}</pre>'
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