maringetxway commited on
Commit
126effc
Β·
verified Β·
1 Parent(s): 75507a1

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +20 -39
index.html CHANGED
@@ -21,25 +21,28 @@
21
  useState
22
  } = React;
23
  function App() {
24
- const [searchQuery, setSearchQuery] = useState("");
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 => {
@@ -83,36 +86,14 @@ fetch("https://huggingface.co/api/repos/LeRobot-worldwide-hackathon/submissions/
83
  "🌍 Worldwide", React.createElement("br", null),
84
  "πŸ“… June 2025, 14 at 09:00 AM (UTC+2) – June 2025, 15 at 06:00 PM (UTC+2)"
85
  ),
86
-
87
  React.createElement("div", {
88
  className: "flex flex-wrap justify-center items-center gap-8 mb-10"
89
  },
90
  ),
91
 
92
  React.createElement("div", {
93
- className: "flex justify-center mb-6"
94
- },
95
-
96
- React.createElement("input", {
97
- type: "text",
98
- placeholder: "Search videos…",
99
- className: "px-4 py-2 w-full max-w-md border rounded-md shadow-md",
100
- value: searchQuery,
101
- onChange: (e) => setSearchQuery(e.target.value.toLowerCase())
102
- })
103
- )
104
-
105
- React.createElement("div", {
106
  className: "columns-1 sm:columns-2 lg:columns-3 gap-4 space-y-4"
107
- }, videos
108
- .filter(video => {
109
- return (
110
- video.label.toLowerCase().includes(searchQuery) ||
111
- video.url.toLowerCase().includes(searchQuery)
112
- );
113
- })
114
- .map((video, i) =>
115
-
116
  React.createElement("div", {
117
  key: i,
118
  className: "break-inside-avoid bg-white rounded-2xl shadow-md overflow-hidden"
 
21
  useState
22
  } = React;
23
  function App() {
 
24
  const [videos, setVideos] = useState([]);
25
  const [teamDatasets, setTeamDatasets] = useState({});
26
  useEffect(() => {
27
+ fetch("https://huggingface.co/api/datasets/LeRobot-worldwide-hackathon/submissions/tree/main")
28
+ .then(res => res.json())
29
+ .then(data => {
30
+ const videoFiles = data
31
+ .filter(file => file.path.endsWith(".mp4"))
32
+ .map(file => {
33
+ const url =
34
+ `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}` : "Unknown Team";
38
+ return {
39
+ url,
40
+ label,
41
+ team
42
+ };
43
+ });
44
+ setVideos(videoFiles);
45
+ });
46
  fetch("https://huggingface.co/api/datasets?author=maringetxway")
47
  .then(res => res.json())
48
  .then(data => {
 
86
  "🌍 Worldwide", React.createElement("br", null),
87
  "πŸ“… June 2025, 14 at 09:00 AM (UTC+2) – June 2025, 15 at 06:00 PM (UTC+2)"
88
  ),
 
89
  React.createElement("div", {
90
  className: "flex flex-wrap justify-center items-center gap-8 mb-10"
91
  },
92
  ),
93
 
94
  React.createElement("div", {
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  className: "columns-1 sm:columns-2 lg:columns-3 gap-4 space-y-4"
96
+ }, videos.map((video, i) =>
 
 
 
 
 
 
 
 
97
  React.createElement("div", {
98
  key: i,
99
  className: "break-inside-avoid bg-white rounded-2xl shadow-md overflow-hidden"