maringetxway commited on
Commit
2899db8
·
verified ·
1 Parent(s): 289d6c3

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +133 -11
index.html CHANGED
@@ -1,18 +1,140 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
 
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>LeRobot Hackathon Demos</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <h1>LeRobot Hackathon Demo Videos</h1>
11
- <div class="video-grid" id="videoContainer"></div>
 
 
 
 
12
 
13
- <script src="main.js">
14
-
15
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  </body>
 
17
  </html>
18
 
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
+
4
  <head>
5
+ <meta charset="UTF-8" />
6
+ <title>LeRobot Worldwide Hackathon</title>
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <!-- Tailwind CDN -->
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+ <!-- React & ReactDOM CDN -->
11
+ <script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
12
+ <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
13
+ </head>
14
+
15
+ <body class="bg-white">
16
+ <div id="root"></div>
17
 
18
+ <script type="text/javascript">
19
+ const {
20
+ useEffect,
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 => {
49
+ const map = {};
50
+ data.forEach(entry => {
51
+ const match = entry.id.match(/maringetxway\/team[_-]?(\d+)/i);
52
+ if (match) {
53
+ const team = match[1];
54
+ if (!map[team]) map[team] = [];
55
+ map[team].push(`https://huggingface.co/spaces/lerobot/visualize_dataset?dataset=${entry.id}`);
56
+ }
57
+ });
58
+ setTeamDatasets(map);
59
+ });
60
+ }, []);
61
+ return React.createElement("div", {
62
+ className: "min-h-screen p-6 bg-[linear-gradient(-45deg,#dbeafe,#f0abfc,#fcd34d,#a5f3fc)] bg-[length:400%_400%]",
63
+ style: {
64
+ animation: "gradientBG 15s ease infinite"
65
+ }
66
+ },
67
+ React.createElement("style", {
68
+ dangerouslySetInnerHTML: {
69
+ __html: `
70
+ @keyframes gradientBG {
71
+ 0% { background-position: 0% 50%; }
72
+ 50% { background-position: 100% 50%; }
73
+ 100% { background-position: 0% 50%; }
74
+ }
75
+ `
76
+ }
77
+ }),
78
+ React.createElement("h1", {
79
+ className: "text-3xl font-bold mb-2 text-center"
80
+ },
81
+ React.createElement("a", {
82
+ href: "https://huggingface.co/",
83
+ className: "text-orange-500 underline",
84
+ target: "_blank"
85
+ }, "Hugging Face"), "LeRobot Worldwide Hackathon"
86
+ ),
87
+ React.createElement("p", {
88
+ className: "text-center text-gray-700 mb-6"
89
+ },
90
+ "Worldwide", React.createElement("br", null),
91
+ "June 2025, 14 at 09:00 AM (UTC+2) – June 2025, 15 at 06:00 PM (UTC+2)"
92
+ ),
93
+ React.createElement("div", {
94
+ className: "flex flex-wrap justify-center items-center gap-8 mb-10"
95
+ },
96
+ ),
97
+
98
+ React.createElement("div", {
99
+ className: "columns-1 sm:columns-2 lg:columns-3 gap-4 space-y-4"
100
+ }, videos.map((video, i) =>
101
+ React.createElement("div", {
102
+ key: i,
103
+ className: "break-inside-avoid bg-white rounded-2xl shadow-md overflow-hidden"
104
+ },
105
+ React.createElement("video", {
106
+ src: video.url,
107
+ controls: true,
108
+ className: "w-full h-auto"
109
+ }),
110
+ React.createElement("div", {
111
+ className: "p-2 text-center text-sm font-medium text-gray-700"
112
+ },
113
+ video.label,
114
+ video.team && teamDatasets[video.team] &&
115
+ React.createElement("div", {
116
+ className: "mt-1 space-y-1"
117
+ },
118
+ teamDatasets[video.team].map((url, j) =>
119
+ React.createElement("div", {
120
+ key: j
121
+ },
122
+ React.createElement("a", {
123
+ href: url,
124
+ className: "text-blue-500 underline",
125
+ target: "_blank"
126
+ }, `Dataset: ${url.split('=')[1]}`)
127
+ )
128
+ )
129
+ )
130
+ )
131
+ )
132
+ ))
133
+ );
134
+ }
135
+ ReactDOM.createRoot(document.getElementById("root")).render(React.createElement(App));
136
+ </script>
137
  </body>
138
+
139
  </html>
140