Spaces:
Sleeping
Sleeping
Update player.py
Browse files
player.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import HfApi, list_files_info
|
3 |
token = ""
|
|
|
4 |
api = HfApi(token=token)
|
5 |
|
6 |
|
@@ -16,9 +17,14 @@ def find_dataset(author=None):
|
|
16 |
spaces.append(f'{space.id}<br>')
|
17 |
out_html = f'{out_html}<b>{space.id}</b><br>'
|
18 |
file_box = [info.path for info in list_files_info(f'{space.id}', repo_type="dataset")]
|
|
|
19 |
for file in file_box:
|
20 |
if file.startswith("prompt_"):
|
|
|
21 |
out_html=f'{out_html} • {file}<br>'
|
|
|
|
|
|
|
22 |
#print([info.path for info in list_files_info(f'{space.id}', repo_type="dataset")])
|
23 |
#print(space.id)
|
24 |
except Exception as e:
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import HfApi, list_files_info
|
3 |
token = ""
|
4 |
+
source_dataset = "jbilcke-hf/ai-tube-index"
|
5 |
api = HfApi(token=token)
|
6 |
|
7 |
|
|
|
17 |
spaces.append(f'{space.id}<br>')
|
18 |
out_html = f'{out_html}<b>{space.id}</b><br>'
|
19 |
file_box = [info.path for info in list_files_info(f'{space.id}', repo_type="dataset")]
|
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} • {file}<br>'
|
25 |
+
if prompt_file.split("prompt_",1)[1].split(".",1)[0] in file_box:
|
26 |
+
print("yes")
|
27 |
+
|
28 |
#print([info.path for info in list_files_info(f'{space.id}', repo_type="dataset")])
|
29 |
#print(space.id)
|
30 |
except Exception as e:
|