Update index.html
Browse files- index.html +15 -19
index.html
CHANGED
|
@@ -25,25 +25,21 @@
|
|
| 25 |
const [videos, setVideos] = useState([]);
|
| 26 |
const [teamDatasets, setTeamDatasets] = useState({});
|
| 27 |
useEffect(() => {
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 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 => {
|