maringetxway commited on
Commit
75507a1
·
verified ·
1 Parent(s): b252312

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +15 -19
index.html CHANGED
@@ -25,25 +25,21 @@
25
  const [videos, setVideos] = useState([]);
26
  const [teamDatasets, setTeamDatasets] = useState({});
27
  useEffect(() => {
28
- fetch("https://huggingface.co/api/datasets/LeRobot-worldwide-hackathon/submissions/tree/main")
29
- .then(res => res.json())
30
- .then(data => {
31
- const videoFiles = data
32
- .filter(file => file.path.endsWith(".mp4"))
33
- .map(file => {
34
- const url =
35
- `https://huggingface.co/datasets/LeRobot-worldwide-hackathon/submissions/resolve/main/${encodeURIComponent(file.path)}`;
36
- const match = file.path.match(/(?:team|group)[-_ ]?(\d+)/i);
37
- const team = match ? match[1] : null;
38
- const label = team ? `Team ${team}` : "Unknown Team";
39
- return {
40
- url,
41
- label,
42
- team
43
- };
44
- });
45
- setVideos(videoFiles);
46
- });
47
  fetch("https://huggingface.co/api/datasets?author=maringetxway")
48
  .then(res => res.json())
49
  .then(data => {
 
25
  const [videos, setVideos] = useState([]);
26
  const [teamDatasets, setTeamDatasets] = useState({});
27
  useEffect(() => {
28
+ fetch("https://huggingface.co/api/repos/LeRobot-worldwide-hackathon/submissions/tree/main")
29
+ .then(res => res.json())
30
+ .then(data => {
31
+ const videoFiles = data
32
+ .filter(file => file.type === "file" && file.path.endsWith(".mp4"))
33
+ .map(file => {
34
+ const url = `https://huggingface.co/datasets/LeRobot-worldwide-hackathon/submissions/resolve/main/${encodeURIComponent(file.path)}`;
35
+ const match = file.path.match(/(?:team|group)[-_ ]?(\d+)/i);
36
+ const team = match ? match[1] : null;
37
+ const label = team ? `Team ${team}` : file.path;
38
+ return { url, label, team };
39
+ });
40
+ setVideos(videoFiles);
41
+ });
42
+
 
 
 
 
43
  fetch("https://huggingface.co/api/datasets?author=maringetxway")
44
  .then(res => res.json())
45
  .then(data => {