celinah HF Staff commited on
Commit
541ed25
·
verified ·
1 Parent(s): f13cb95

i only want the timeline from 2020 to 2025 as animated (gif) and static (png). use a code like font and use the hugging face logo 🤗 use the same color/branding. i don't want any other chart.

Browse files
Files changed (3) hide show
  1. index.html +78 -92
  2. script.js +2 -45
  3. style.css +12 -23
index.html CHANGED
@@ -1,122 +1,108 @@
 
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>HuggingFace Hub Timeline</title>
 
7
  <link rel="stylesheet" href="style.css">
8
- <script src="https://cdn.tailwindcss.com"></script>
9
- <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
- <script src="https://unpkg.com/feather-icons"></script>
11
- <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.9.1/chart.min.js"></script>
12
  <script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
13
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js"></script>
14
  </head>
15
- <body class="bg-gray-50">
16
- <div class="container mx-auto px-4 py-12">
17
- <div class="text-center mb-12">
18
- <h1 class="text-4xl font-bold text-indigo-900 mb-4">The Evolution of HuggingFace Hub</h1>
19
- <p class="text-xl text-gray-600 max-w-3xl mx-auto">A visual journey through key milestones of the huggingface_hub library</p>
 
 
 
 
20
  </div>
21
 
22
- <div class="relative">
23
- <!-- Timeline -->
24
- <div class="overflow-x-auto pb-12">
25
- <div id="timeline-container" class="min-w-[1200px]">
26
- <div class="flex flex-col">
27
- <!-- Timeline line -->
28
- <div class="relative h-2 bg-gradient-to-r from-purple-500 to-indigo-600 rounded-full mx-16 mb-16"></div>
29
-
30
- <!-- Timeline items -->
31
- <div class="flex justify-between px-16">
32
- <!-- 2020-2021 -->
33
- <div class="timeline-item relative w-64">
34
- <div class="absolute -top-10 left-1/2 transform -translate-x-1/2 w-6 h-6 bg-indigo-600 rounded-full border-4 border-white shadow-lg"></div>
35
- <div class="bg-white p-6 rounded-xl shadow-lg mt-4">
36
- <h3 class="font-bold text-indigo-800">Foundation Years</h3>
37
- <p class="text-sm text-gray-600">2020-2021</p>
38
- <ul class="mt-2 space-y-1 text-sm text-gray-700">
39
- <li>• v0.0.1: First release</li>
40
- <li>• Git wrapper for ML models</li>
41
- <li>• Token-based auth</li>
42
- </ul>
43
- </div>
44
- </div>
45
 
46
- <!-- 2022 -->
47
- <div class="timeline-item relative w-64">
48
- <div class="absolute -top-10 left-1/2 transform -translate-x-1/2 w-6 h-6 bg-indigo-600 rounded-full border-4 border-white shadow-lg"></div>
49
- <div class="bg-white p-6 rounded-xl shadow-lg mt-4">
50
- <h3 class="font-bold text-indigo-800">Git to HTTP</h3>
51
- <p class="text-sm text-gray-600">2022</p>
52
- <ul class="mt-2 space-y-1 text-sm text-gray-700">
53
- <li>• HTTP Commit API</li>
54
- <li>• Git-aware cache</li>
55
- <li>• Spaces integration</li>
56
- </ul>
57
- </div>
58
- </div>
59
 
60
- <!-- 2022-2024 -->
61
- <div class="timeline-item relative w-64">
62
- <div class="absolute -top-10 left-1/2 transform -translate-x-1/2 w-6 h-6 bg-indigo-600 rounded-full border-4 border-white shadow-lg"></div>
63
- <div class="bg-white p-6 rounded-xl shadow-lg mt-4">
64
- <h3 class="font-bold text-indigo-800">API Expansion</h3>
65
- <p class="text-sm text-gray-600">2022-2024</p>
66
- <ul class="mt-2 space-y-1 text-sm text-gray-700">
67
- <li>• Inference Endpoints</li>
68
- <li>• Community APIs</li>
69
- <li>• Collections</li>
70
- </ul>
71
- </div>
72
- </div>
73
 
74
- <!-- 2024-2025 -->
75
- <div class="timeline-item relative w-64">
76
- <div class="absolute -top-10 left-1/2 transform -translate-x-1/2 w-6 h-6 bg-indigo-600 rounded-full border-4 border-white shadow-lg"></div>
77
- <div class="bg-white p-6 rounded-xl shadow-lg mt-4">
78
- <h3 class="font-bold text-indigo-800">Xet Protocol</h3>
79
- <p class="text-sm text-gray-600">2024-2025</p>
80
- <ul class="mt-2 space-y-1 text-sm text-gray-700">
81
- <li>• Chunk-level storage</li>
82
- <li>• 77PB+ migrated</li>
83
- <li>• Faster transfers</li>
84
- </ul>
85
- </div>
86
- </div>
87
  </div>
88
  </div>
89
  </div>
90
  </div>
91
-
92
- <!-- Stats Chart -->
93
- <div class="mt-16 bg-white rounded-xl shadow-lg p-6">
94
- <canvas id="growthChart" height="300"></canvas>
95
- </div>
96
  </div>
97
 
98
- <div class="mt-12 flex justify-center space-x-4">
99
- <button id="downloadPng" class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-2 rounded-lg flex items-center">
100
- <i data-feather="download" class="mr-2"></i> Download as PNG
101
  </button>
102
- <button id="generateGif" class="bg-purple-600 hover:bg-purple-700 text-white px-6 py-2 rounded-lg flex items-center">
103
- <i data-feather="film" class="mr-2"></i> Generate GIF
104
  </button>
105
  </div>
106
 
107
- <div id="gif-preview" class="mt-8 hidden text-center">
108
- <h3 class="text-lg font-semibold mb-4">GIF Preview</h3>
109
- <div class="flex justify-center">
110
- <img id="gif-result" class="max-w-full rounded-lg border border-gray-200 shadow">
111
- </div>
112
- <button id="downloadGif" class="mt-4 bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded-lg flex items-center mx-auto">
113
- <i data-feather="download" class="mr-2"></i> Download GIF
114
  </button>
115
  </div>
116
  </div>
117
 
118
  <script src="script.js"></script>
119
- <script>feather.replace();</script>
120
- <script src="https://deepsite.hf.co/deepsite-badge.js"></script>
121
  </body>
122
- </html>
 
1
+
2
  <!DOCTYPE html>
3
  <html lang="en">
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>🤗 HuggingFace Timeline</title>
8
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap">
9
  <link rel="stylesheet" href="style.css">
 
 
 
 
10
  <script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
11
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js"></script>
12
  </head>
13
+ <body style="font-family: 'Inter', sans-serif; background-color: #f5f5f5;">
14
+ <div class="container" style="max-width: 1200px; margin: 0 auto; padding: 2rem;">
15
+ <div style="text-align: center; margin-bottom: 3rem;">
16
+ <h1 style="font-size: 2.5rem; font-weight: 700; color: #ffd21e; margin-bottom: 1rem;">
17
+ 🤗 HuggingFace Hub Timeline
18
+ </h1>
19
+ <p style="font-size: 1.25rem; color: #555;">
20
+ 2020 → 2025: Key milestones in the evolution
21
+ </p>
22
  </div>
23
 
24
+ <div class="timeline-wrapper" style="background: white; border-radius: 12px; padding: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1);">
25
+ <div id="timeline-container" style="position: relative; min-height: 300px;">
26
+ <div style="position: relative; height: 4px; background: linear-gradient(to right, #ffd21e, #ff6b00); margin: 0 4rem 4rem; border-radius: 2px;"></div>
27
+
28
+ <div style="display: flex; justify-content: space-between; padding: 0 3rem;">
29
+ <!-- 2020-2021 -->
30
+ <div class="timeline-item" style="width: 200px; position: relative;">
31
+ <div style="position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: #ff6b00; border-radius: 50%; border: 3px solid white;"></div>
32
+ <div style="background: white; padding: 1.5rem; border-radius: 8px; margin-top: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
33
+ <h3 style="font-weight: 600; color: #ff6b00; margin: 0 0 0.5rem 0;">Foundation</h3>
34
+ <p style="font-size: 0.875rem; color: #888; margin: 0 0 1rem 0;">2020-2021</p>
35
+ <ul style="padding-left: 1rem; margin: 0; font-size: 0.875rem; color: #555; line-height: 1.6;">
36
+ <li>• First release</li>
37
+ <li>• Git wrapper</li>
38
+ <li>• Token auth</li>
39
+ </ul>
40
+ </div>
41
+ </div>
 
 
 
 
 
42
 
43
+ <!-- 2022 -->
44
+ <div class="timeline-item" style="width: 200px; position: relative;">
45
+ <div style="position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: #ff6b00; border-radius: 50%; border: 3px solid white;"></div>
46
+ <div style="background: white; padding: 1.5rem; border-radius: 8px; margin-top: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
47
+ <h3 style="font-weight: 600; color: #ff6b00; margin: 0 0 0.5rem 0;">Git to HTTP</h3>
48
+ <p style="font-size: 0.875rem; color: #888; margin: 0 0 1rem 0;">2022</p>
49
+ <ul style="padding-left: 1rem; margin: 0; font-size: 0.875rem; color: #555; line-height: 1.6;">
50
+ <li>• HTTP Commit API</li>
51
+ <li>• Git-aware cache</li>
52
+ <li>• Spaces</li>
53
+ </ul>
54
+ </div>
55
+ </div>
56
 
57
+ <!-- 2023-2024 -->
58
+ <div class="timeline-item" style="width: 200px; position: relative;">
59
+ <div style="position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: #ff6b00; border-radius: 50%; border: 3px solid white;"></div>
60
+ <div style="background: white; padding: 1.5rem; border-radius: 8px; margin-top: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
61
+ <h3 style="font-weight: 600; color: #ff6b00; margin: 0 0 0.5rem 0;">API Expansion</h3>
62
+ <p style="font-size: 0.875rem; color: #888; margin: 0 0 1rem 0;">2023-2024</p>
63
+ <ul style="padding-left: 1rem; margin: 0; font-size: 0.875rem; color: #555; line-height: 1.6;">
64
+ <li>• Inference API</li>
65
+ <li>• Community features</li>
66
+ <li>• Collections</li>
67
+ </ul>
68
+ </div>
69
+ </div>
70
 
71
+ <!-- 2025 -->
72
+ <div class="timeline-item" style="width: 200px; position: relative;">
73
+ <div style="position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: #ff6b00; border-radius: 50%; border: 3px solid white;"></div>
74
+ <div style="background: white; padding: 1.5rem; border-radius: 8px; margin-top: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05);">
75
+ <h3 style="font-weight: 600; color: #ff6b00; margin: 0 0 0.5rem 0;">Xet Protocol</h3>
76
+ <p style="font-size: 0.875rem; color: #888; margin: 0 0 1rem 0;">2025</p>
77
+ <ul style="padding-left: 1rem; margin: 0; font-size: 0.875rem; color: #555; line-height: 1.6;">
78
+ <li>• Chunk storage</li>
79
+ <li>• 77PB+ migrated</li>
80
+ <li>• Faster transfers</li>
81
+ </ul>
 
 
82
  </div>
83
  </div>
84
  </div>
85
  </div>
 
 
 
 
 
86
  </div>
87
 
88
+ <div style="margin-top: 2rem; display: flex; justify-content: center; gap: 1rem;">
89
+ <button id="downloadPng" style="background: #ff6b00; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center;">
90
+ <span>Download PNG</span>
91
  </button>
92
+ <button id="generateGif" style="background: #ffd21e; color: #222; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center;">
93
+ <span>Generate GIF</span>
94
  </button>
95
  </div>
96
 
97
+ <div id="gif-preview" style="margin-top: 2rem; display: none; text-align: center;">
98
+ <h3 style="font-weight: 600; margin-bottom: 1rem;">GIF Preview</h3>
99
+ <img id="gif-result" style="max-width: 100%; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
100
+ <button id="downloadGif" style="margin-top: 1rem; background: #ff6b00; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer;">
101
+ Download GIF
 
 
102
  </button>
103
  </div>
104
  </div>
105
 
106
  <script src="script.js"></script>
 
 
107
  </body>
108
+ </html>
script.js CHANGED
@@ -1,50 +1,7 @@
1
- document.addEventListener('DOMContentLoaded', function() {
2
- // Initialize Chart.js
3
- const ctx = document.getElementById('growthChart').getContext('2d');
4
- const growthChart = new Chart(ctx, {
5
- type: 'line',
6
- data: {
7
- labels: ['2020', '2021', '2022', '2023', '2024', '2025'],
8
- datasets: [{
9
- label: 'Repositories',
10
- data: [1000, 15000, 100000, 500000, 3000000, 6000000],
11
- borderColor: '#6366F1',
12
- backgroundColor: 'rgba(99, 102, 241, 0.1)',
13
- tension: 0.3,
14
- fill: true
15
- }, {
16
- label: 'Storage (PB)',
17
- data: [0.1, 1, 5, 20, 50, 77],
18
- borderColor: '#8B5CF6',
19
- backgroundColor: 'rgba(139, 92, 246, 0.1)',
20
- tension: 0.3,
21
- fill: true
22
- }]
23
- },
24
- options: {
25
- responsive: true,
26
- plugins: {
27
- title: {
28
- display: true,
29
- text: 'HuggingFace Hub Growth Metrics',
30
- font: {
31
- size: 18
32
- }
33
- },
34
- legend: {
35
- position: 'top',
36
- }
37
- },
38
- scales: {
39
- y: {
40
- beginAtZero: true
41
- }
42
- }
43
- }
44
- });
45
 
 
46
  // Animate timeline items on scroll
47
- const timelineItems = document.querySelectorAll('.timeline-item');
48
  const observer = new IntersectionObserver((entries) => {
49
  entries.forEach(entry => {
50
  if (entry.isIntersecting) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+ document.addEventListener('DOMContentLoaded', function() {
3
  // Animate timeline items on scroll
4
+ const timelineItems = document.querySelectorAll('.timeline-item');
5
  const observer = new IntersectionObserver((entries) => {
6
  entries.forEach(entry => {
7
  if (entry.isIntersecting) {
style.css CHANGED
@@ -1,4 +1,5 @@
1
- /* Animation for timeline items */
 
2
  .timeline-item {
3
  opacity: 0;
4
  transform: translateY(20px);
@@ -10,32 +11,20 @@
10
  transform: translateY(0);
11
  }
12
 
13
- /* Custom scrollbar for horizontal timeline */
14
- .overflow-x-auto::-webkit-scrollbar {
15
- height: 8px;
16
- }
17
-
18
- .overflow-x-auto::-webkit-scrollbar-track {
19
- background: #f1f1f1;
20
- border-radius: 10px;
21
  }
22
 
23
- .overflow-x-auto::-webkit-scrollbar-thumb {
24
- background: #888;
25
- border-radius: 10px;
26
  }
27
 
28
- .overflow-x-auto::-webkit-scrollbar-thumb:hover {
29
- background: #555;
30
  }
31
 
32
- /* Pulse animation for download buttons */
33
- @keyframes pulse {
34
- 0% { transform: scale(1); }
35
- 50% { transform: scale(1.05); }
36
- 100% { transform: scale(1); }
37
  }
38
-
39
- #downloadPng:hover, #generateGif:hover, #downloadGif:hover {
40
- animation: pulse 1.5s infinite;
41
- }
 
1
+
2
+ /* Timeline item animations */
3
  .timeline-item {
4
  opacity: 0;
5
  transform: translateY(20px);
 
11
  transform: translateY(0);
12
  }
13
 
14
+ /* Button hover effects */
15
+ #downloadPng:hover, #generateGif:hover, #downloadGif:hover {
16
+ transform: translateY(-2px);
17
+ transition: transform 0.2s ease;
 
 
 
 
18
  }
19
 
20
+ #downloadPng:hover {
21
+ background: #ff8c42 !important;
 
22
  }
23
 
24
+ #generateGif:hover {
25
+ background: #ffe050 !important;
26
  }
27
 
28
+ #downloadGif:hover {
29
+ background: #ff8c42 !important;
 
 
 
30
  }