Omnibus commited on
Commit
2f9a731
·
1 Parent(s): 97e8319

Update player.py

Browse files
Files changed (1) hide show
  1. player.py +4 -3
player.py CHANGED
@@ -20,15 +20,16 @@ def find_dataset(author=None):
20
  ai_tube_box = [info.path for info in list_files_info(f'{source_dataset}', repo_type="dataset")]
21
  for file in file_box:
22
  if file.startswith("prompt_"):
23
- prompt_file = file
24
  out_html=f'{out_html}<pre> • {file}</pre>'
25
  print(prompt_file)
26
  for vid_file in ai_tube_box:
 
27
  print(vid_file)
28
  try:
29
- if vid_file.split("videos/",1)[1].split(".",1)[0] == prompt_file.split("prompt_",1)[1].split(".",1)[0]:
30
- print("yes")
31
  out_html=f'{out_html}<pre> + {vid_file}</pre>'
 
32
  except Exception:
33
  pass
34
 
 
20
  ai_tube_box = [info.path for info in list_files_info(f'{source_dataset}', repo_type="dataset")]
21
  for file in file_box:
22
  if file.startswith("prompt_"):
23
+ prompt_slug = file.split("prompt_",1)[1].split(".",1)[0]
24
  out_html=f'{out_html}<pre> • {file}</pre>'
25
  print(prompt_file)
26
  for vid_file in ai_tube_box:
27
+ vid_slug=vid_file.split("videos/",1)[1].split(".",1)[0]
28
  print(vid_file)
29
  try:
30
+ if vid_slug == prompt_slug:
 
31
  out_html=f'{out_html}<pre> + {vid_file}</pre>'
32
+
33
  except Exception:
34
  pass
35