Upload templates/index.html with huggingface_hub
Browse files- templates/index.html +340 -196
templates/index.html
CHANGED
|
@@ -3,329 +3,473 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>OpenRouter Models</title>
|
| 7 |
<style>
|
| 8 |
-
* {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
body {
|
| 10 |
-
font-family:
|
| 11 |
-
background:
|
|
|
|
| 12 |
min-height: 100vh;
|
| 13 |
-
|
| 14 |
}
|
|
|
|
| 15 |
.container {
|
| 16 |
max-width: 1400px;
|
| 17 |
margin: 0 auto;
|
| 18 |
-
padding: 2rem;
|
| 19 |
}
|
|
|
|
| 20 |
header {
|
| 21 |
text-align: center;
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
backdrop-filter: blur(10px);
|
| 27 |
border: 1px solid rgba(255,255,255,0.1);
|
| 28 |
}
|
| 29 |
-
|
|
|
|
| 30 |
font-size: 2.5rem;
|
| 31 |
-
margin-bottom:
|
| 32 |
-
background: linear-gradient(135deg,
|
| 33 |
-webkit-background-clip: text;
|
| 34 |
-webkit-text-fill-color: transparent;
|
|
|
|
| 35 |
}
|
| 36 |
-
|
| 37 |
-
|
|
|
|
| 38 |
font-size: 1.1rem;
|
| 39 |
}
|
|
|
|
| 40 |
.controls {
|
| 41 |
display: flex;
|
| 42 |
-
gap: 1rem;
|
| 43 |
-
margin-bottom: 2rem;
|
| 44 |
flex-wrap: wrap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
align-items: center;
|
| 46 |
}
|
|
|
|
| 47 |
.search-box {
|
| 48 |
flex: 1;
|
| 49 |
-
min-width:
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
font-size: 1rem;
|
| 56 |
-
|
| 57 |
-
transition: all 0.3s;
|
| 58 |
}
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
| 62 |
}
|
| 63 |
-
|
| 64 |
.btn {
|
| 65 |
-
padding:
|
| 66 |
border: none;
|
| 67 |
-
border-radius:
|
| 68 |
cursor: pointer;
|
| 69 |
-
font-size: 0.9rem;
|
| 70 |
font-weight: 600;
|
| 71 |
-
transition: all 0.3s;
|
| 72 |
text-decoration: none;
|
| 73 |
display: inline-flex;
|
| 74 |
align-items: center;
|
| 75 |
-
gap:
|
|
|
|
|
|
|
| 76 |
}
|
|
|
|
| 77 |
.btn-primary {
|
| 78 |
-
background: linear-gradient(135deg,
|
| 79 |
color: white;
|
| 80 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
.btn-secondary {
|
| 82 |
-
background:
|
| 83 |
-
color:
|
| 84 |
-
border: 1px solid rgba(255,255,255,0.2);
|
| 85 |
}
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
}
|
|
|
|
| 90 |
.stats-bar {
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
margin-bottom: 2rem;
|
| 94 |
-
padding: 1rem 2rem;
|
| 95 |
-
background: rgba(255,255,255,0.05);
|
| 96 |
border-radius: 12px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
|
|
|
| 98 |
.stat {
|
| 99 |
-
|
| 100 |
-
flex-direction: column;
|
| 101 |
}
|
|
|
|
| 102 |
.stat-value {
|
| 103 |
-
font-size:
|
| 104 |
-
font-weight:
|
| 105 |
-
color:
|
| 106 |
}
|
|
|
|
| 107 |
.stat-label {
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
text-transform: uppercase;
|
| 111 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
table {
|
| 113 |
width: 100%;
|
| 114 |
border-collapse: collapse;
|
| 115 |
-
|
| 116 |
-
border-radius: 20px;
|
| 117 |
-
overflow: hidden;
|
| 118 |
-
backdrop-filter: blur(10px);
|
| 119 |
-
}
|
| 120 |
-
thead {
|
| 121 |
-
background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(123,44,191,0.2));
|
| 122 |
}
|
|
|
|
| 123 |
th {
|
| 124 |
-
|
|
|
|
| 125 |
text-align: left;
|
| 126 |
font-weight: 600;
|
| 127 |
-
text-transform: uppercase;
|
| 128 |
-
font-size: 0.75rem;
|
| 129 |
-
letter-spacing: 0.5px;
|
| 130 |
cursor: pointer;
|
| 131 |
user-select: none;
|
| 132 |
-
transition: all 0.3s;
|
| 133 |
position: relative;
|
|
|
|
| 134 |
}
|
|
|
|
| 135 |
th:hover {
|
| 136 |
-
background:
|
| 137 |
}
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
margin-left:
|
| 141 |
-
font-size: 0.7rem;
|
| 142 |
opacity: 0.5;
|
| 143 |
}
|
| 144 |
-
|
|
|
|
| 145 |
content: 'โฒ';
|
| 146 |
opacity: 1;
|
| 147 |
}
|
| 148 |
-
|
|
|
|
| 149 |
content: 'โผ';
|
| 150 |
opacity: 1;
|
| 151 |
}
|
| 152 |
-
|
|
|
|
|
|
|
| 153 |
border-bottom: 1px solid rgba(255,255,255,0.05);
|
| 154 |
-
|
| 155 |
-
}
|
| 156 |
-
tbody tr:hover {
|
| 157 |
-
background: rgba(255,255,255,0.08);
|
| 158 |
}
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
}
|
|
|
|
| 163 |
.model-name {
|
|
|
|
| 164 |
font-weight: 600;
|
| 165 |
-
color: #fff;
|
| 166 |
-
}
|
| 167 |
-
.provider {
|
| 168 |
-
color: #888;
|
| 169 |
-
font-size: 0.8rem;
|
| 170 |
}
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
padding: 0.3rem 0.8rem;
|
| 174 |
-
border-radius: 20px;
|
| 175 |
-
font-size: 0.8rem;
|
| 176 |
-
color: #00d4ff;
|
| 177 |
-
}
|
| 178 |
-
.price {
|
| 179 |
-
font-family: monospace;
|
| 180 |
font-size: 0.85rem;
|
| 181 |
-
color:
|
|
|
|
| 182 |
}
|
|
|
|
| 183 |
.architecture {
|
| 184 |
display: flex;
|
| 185 |
-
gap:
|
| 186 |
flex-wrap: wrap;
|
| 187 |
}
|
|
|
|
| 188 |
.badge {
|
| 189 |
-
padding:
|
| 190 |
-
border-radius:
|
| 191 |
-
font-size: 0.
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
color:
|
| 197 |
}
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
}
|
| 202 |
-
|
| 203 |
footer {
|
| 204 |
-
margin-top: 3rem;
|
| 205 |
text-align: center;
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
}
|
|
|
|
| 209 |
@media (max-width: 768px) {
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
}
|
| 214 |
</style>
|
| 215 |
</head>
|
| 216 |
<body>
|
| 217 |
<div class="container">
|
| 218 |
<header>
|
| 219 |
-
<h1>
|
| 220 |
-
<p
|
| 221 |
</header>
|
| 222 |
|
| 223 |
<div class="stats-bar">
|
| 224 |
<div class="stat">
|
| 225 |
-
<
|
| 226 |
-
<
|
| 227 |
</div>
|
| 228 |
<div class="stat">
|
| 229 |
-
<
|
| 230 |
-
<
|
| 231 |
</div>
|
| 232 |
<div class="stat">
|
| 233 |
-
<
|
| 234 |
-
<
|
| 235 |
</div>
|
| 236 |
</div>
|
| 237 |
|
| 238 |
<div class="controls">
|
| 239 |
-
<
|
| 240 |
-
|
| 241 |
-
<
|
|
|
|
|
|
|
|
|
|
| 242 |
</div>
|
| 243 |
|
| 244 |
-
<
|
| 245 |
-
<
|
| 246 |
-
<
|
| 247 |
-
<
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
<
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
<
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
<
|
| 268 |
-
|
| 269 |
-
{%
|
| 270 |
-
|
| 271 |
-
{%
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
</
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
|
| 283 |
<footer>
|
| 284 |
-
<p>Data
|
|
|
|
| 285 |
</footer>
|
| 286 |
</div>
|
| 287 |
|
| 288 |
<script>
|
|
|
|
|
|
|
| 289 |
// Search functionality
|
| 290 |
-
document.getElementById('
|
| 291 |
-
const
|
| 292 |
-
document.querySelectorAll('#modelsTable tbody tr')
|
|
|
|
|
|
|
|
|
|
| 293 |
const text = row.textContent.toLowerCase();
|
| 294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 295 |
});
|
|
|
|
|
|
|
|
|
|
| 296 |
});
|
| 297 |
|
| 298 |
-
//
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
|
| 309 |
-
|
| 310 |
-
|
|
|
|
| 311 |
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
bVal = parseFloat(bVal) || 0;
|
| 319 |
-
}
|
| 320 |
-
|
| 321 |
-
if (aVal < bVal) return sortDir[col] ? -1 : 1;
|
| 322 |
-
if (aVal > bVal) return sortDir[col] ? 1 : -1;
|
| 323 |
-
return 0;
|
| 324 |
-
});
|
| 325 |
|
| 326 |
-
|
| 327 |
});
|
| 328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
</script>
|
| 330 |
</body>
|
| 331 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>OpenRouter Models Explorer</title>
|
| 7 |
<style>
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
:root {
|
| 15 |
+
--bg-primary: #0f172a;
|
| 16 |
+
--bg-secondary: #1e293b;
|
| 17 |
+
--bg-tertiary: #334155;
|
| 18 |
+
--accent-primary: #3b82f6;
|
| 19 |
+
--accent-secondary: #8b5cf6;
|
| 20 |
+
--text-primary: #f8fafc;
|
| 21 |
+
--text-secondary: #94a3b8;
|
| 22 |
+
--success: #22c55e;
|
| 23 |
+
--warning: #f59e0b;
|
| 24 |
+
--error: #ef4444;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
body {
|
| 28 |
+
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
| 29 |
+
background: var(--bg-primary);
|
| 30 |
+
color: var(--text-primary);
|
| 31 |
min-height: 100vh;
|
| 32 |
+
padding: 20px;
|
| 33 |
}
|
| 34 |
+
|
| 35 |
.container {
|
| 36 |
max-width: 1400px;
|
| 37 |
margin: 0 auto;
|
|
|
|
| 38 |
}
|
| 39 |
+
|
| 40 |
header {
|
| 41 |
text-align: center;
|
| 42 |
+
padding: 40px 20px;
|
| 43 |
+
background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
|
| 44 |
+
border-radius: 16px;
|
| 45 |
+
margin-bottom: 30px;
|
|
|
|
| 46 |
border: 1px solid rgba(255,255,255,0.1);
|
| 47 |
}
|
| 48 |
+
|
| 49 |
+
header h1 {
|
| 50 |
font-size: 2.5rem;
|
| 51 |
+
margin-bottom: 10px;
|
| 52 |
+
background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
|
| 53 |
-webkit-background-clip: text;
|
| 54 |
-webkit-text-fill-color: transparent;
|
| 55 |
+
background-clip: text;
|
| 56 |
}
|
| 57 |
+
|
| 58 |
+
header p {
|
| 59 |
+
color: var(--text-secondary);
|
| 60 |
font-size: 1.1rem;
|
| 61 |
}
|
| 62 |
+
|
| 63 |
.controls {
|
| 64 |
display: flex;
|
|
|
|
|
|
|
| 65 |
flex-wrap: wrap;
|
| 66 |
+
gap: 15px;
|
| 67 |
+
margin-bottom: 20px;
|
| 68 |
+
padding: 20px;
|
| 69 |
+
background: var(--bg-secondary);
|
| 70 |
+
border-radius: 12px;
|
| 71 |
align-items: center;
|
| 72 |
}
|
| 73 |
+
|
| 74 |
.search-box {
|
| 75 |
flex: 1;
|
| 76 |
+
min-width: 280px;
|
| 77 |
+
position: relative;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
.search-box input {
|
| 81 |
+
width: 100%;
|
| 82 |
+
padding: 12px 20px;
|
| 83 |
+
border: 2px solid var(--bg-tertiary);
|
| 84 |
+
border-radius: 8px;
|
| 85 |
+
background: var(--bg-primary);
|
| 86 |
+
color: var(--text-primary);
|
| 87 |
font-size: 1rem;
|
| 88 |
+
transition: all 0.3s ease;
|
|
|
|
| 89 |
}
|
| 90 |
+
|
| 91 |
+
.search-box input:focus {
|
| 92 |
+
outline: none;
|
| 93 |
+
border-color: var(--accent-primary);
|
| 94 |
}
|
| 95 |
+
|
| 96 |
.btn {
|
| 97 |
+
padding: 12px 24px;
|
| 98 |
border: none;
|
| 99 |
+
border-radius: 8px;
|
| 100 |
cursor: pointer;
|
|
|
|
| 101 |
font-weight: 600;
|
|
|
|
| 102 |
text-decoration: none;
|
| 103 |
display: inline-flex;
|
| 104 |
align-items: center;
|
| 105 |
+
gap: 8px;
|
| 106 |
+
transition: all 0.3s ease;
|
| 107 |
+
font-size: 0.95rem;
|
| 108 |
}
|
| 109 |
+
|
| 110 |
.btn-primary {
|
| 111 |
+
background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
|
| 112 |
color: white;
|
| 113 |
}
|
| 114 |
+
|
| 115 |
+
.btn-primary:hover {
|
| 116 |
+
transform: translateY(-2px);
|
| 117 |
+
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
.btn-secondary {
|
| 121 |
+
background: var(--bg-tertiary);
|
| 122 |
+
color: var(--text-primary);
|
|
|
|
| 123 |
}
|
| 124 |
+
|
| 125 |
+
.btn-secondary:hover {
|
| 126 |
+
background: var(--accent-primary);
|
| 127 |
}
|
| 128 |
+
|
| 129 |
.stats-bar {
|
| 130 |
+
background: var(--bg-secondary);
|
| 131 |
+
padding: 15px 20px;
|
|
|
|
|
|
|
|
|
|
| 132 |
border-radius: 12px;
|
| 133 |
+
margin-bottom: 20px;
|
| 134 |
+
display: flex;
|
| 135 |
+
gap: 30px;
|
| 136 |
+
flex-wrap: wrap;
|
| 137 |
+
justify-content: center;
|
| 138 |
}
|
| 139 |
+
|
| 140 |
.stat {
|
| 141 |
+
text-align: center;
|
|
|
|
| 142 |
}
|
| 143 |
+
|
| 144 |
.stat-value {
|
| 145 |
+
font-size: 2rem;
|
| 146 |
+
font-weight: 700;
|
| 147 |
+
color: var(--accent-primary);
|
| 148 |
}
|
| 149 |
+
|
| 150 |
.stat-label {
|
| 151 |
+
color: var(--text-secondary);
|
| 152 |
+
font-size: 0.9rem;
|
|
|
|
| 153 |
}
|
| 154 |
+
|
| 155 |
+
.table-container {
|
| 156 |
+
overflow-x: auto;
|
| 157 |
+
background: var(--bg-secondary);
|
| 158 |
+
border-radius: 12px;
|
| 159 |
+
border: 1px solid rgba(255,255,255,0.1);
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
table {
|
| 163 |
width: 100%;
|
| 164 |
border-collapse: collapse;
|
| 165 |
+
min-width: 900px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
}
|
| 167 |
+
|
| 168 |
th {
|
| 169 |
+
background: var(--bg-tertiary);
|
| 170 |
+
padding: 16px;
|
| 171 |
text-align: left;
|
| 172 |
font-weight: 600;
|
|
|
|
|
|
|
|
|
|
| 173 |
cursor: pointer;
|
| 174 |
user-select: none;
|
|
|
|
| 175 |
position: relative;
|
| 176 |
+
transition: background 0.2s;
|
| 177 |
}
|
| 178 |
+
|
| 179 |
th:hover {
|
| 180 |
+
background: var(--accent-primary);
|
| 181 |
}
|
| 182 |
+
|
| 183 |
+
th .sort-indicator {
|
| 184 |
+
margin-left: 8px;
|
|
|
|
| 185 |
opacity: 0.5;
|
| 186 |
}
|
| 187 |
+
|
| 188 |
+
th.sort-asc .sort-indicator::after {
|
| 189 |
content: 'โฒ';
|
| 190 |
opacity: 1;
|
| 191 |
}
|
| 192 |
+
|
| 193 |
+
th.sort-desc .sort-indicator::after {
|
| 194 |
content: 'โผ';
|
| 195 |
opacity: 1;
|
| 196 |
}
|
| 197 |
+
|
| 198 |
+
td {
|
| 199 |
+
padding: 14px 16px;
|
| 200 |
border-bottom: 1px solid rgba(255,255,255,0.05);
|
| 201 |
+
color: var(--text-secondary);
|
|
|
|
|
|
|
|
|
|
| 202 |
}
|
| 203 |
+
|
| 204 |
+
tr:hover {
|
| 205 |
+
background: rgba(59, 130, 246, 0.05);
|
| 206 |
}
|
| 207 |
+
|
| 208 |
.model-name {
|
| 209 |
+
color: var(--text-primary);
|
| 210 |
font-weight: 600;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
}
|
| 212 |
+
|
| 213 |
+
.model-id {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
font-size: 0.85rem;
|
| 215 |
+
color: var(--text-secondary);
|
| 216 |
+
font-family: monospace;
|
| 217 |
}
|
| 218 |
+
|
| 219 |
.architecture {
|
| 220 |
display: flex;
|
| 221 |
+
gap: 6px;
|
| 222 |
flex-wrap: wrap;
|
| 223 |
}
|
| 224 |
+
|
| 225 |
.badge {
|
| 226 |
+
padding: 4px 10px;
|
| 227 |
+
border-radius: 20px;
|
| 228 |
+
font-size: 0.75rem;
|
| 229 |
+
font-weight: 500;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
.badge-primary {
|
| 233 |
+
background: rgba(59, 130, 246, 0.2);
|
| 234 |
+
color: var(--accent-primary);
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.badge-success {
|
| 238 |
+
background: rgba(34, 197, 94, 0.2);
|
| 239 |
+
color: var(--success);
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.badge-warning {
|
| 243 |
+
background: rgba(245, 158, 11, 0.2);
|
| 244 |
+
color: var(--warning);
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
.context {
|
| 248 |
+
font-family: monospace;
|
| 249 |
+
color: var(--accent-secondary);
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
.price {
|
| 253 |
+
font-family: monospace;
|
| 254 |
+
font-weight: 600;
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
.price input {
|
| 258 |
+
color: var(--success);
|
| 259 |
}
|
| 260 |
+
|
| 261 |
+
.price output {
|
| 262 |
+
color: var(--success);
|
| 263 |
}
|
| 264 |
+
|
| 265 |
+
.status {
|
| 266 |
+
display: inline-flex;
|
| 267 |
+
align-items: center;
|
| 268 |
+
gap: 6px;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
.status::before {
|
| 272 |
+
content: '';
|
| 273 |
+
width: 8px;
|
| 274 |
+
height: 8px;
|
| 275 |
+
border-radius: 50%;
|
| 276 |
+
background: var(--success);
|
| 277 |
}
|
| 278 |
+
|
| 279 |
footer {
|
|
|
|
| 280 |
text-align: center;
|
| 281 |
+
padding: 40px;
|
| 282 |
+
color: var(--text-secondary);
|
| 283 |
+
margin-top: 20px;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.no-results {
|
| 287 |
+
text-align: center;
|
| 288 |
+
padding: 60px;
|
| 289 |
+
color: var(--text-secondary);
|
| 290 |
}
|
| 291 |
+
|
| 292 |
@media (max-width: 768px) {
|
| 293 |
+
header h1 {
|
| 294 |
+
font-size: 1.8rem;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
.controls {
|
| 298 |
+
flex-direction: column;
|
| 299 |
+
width: 100%;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.search-box {
|
| 303 |
+
min-width: 100%;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
.btn {
|
| 307 |
+
width: 100%;
|
| 308 |
+
justify-content: center;
|
| 309 |
+
}
|
| 310 |
}
|
| 311 |
</style>
|
| 312 |
</head>
|
| 313 |
<body>
|
| 314 |
<div class="container">
|
| 315 |
<header>
|
| 316 |
+
<h1>๐ฎ OpenRouter Models Explorer</h1>
|
| 317 |
+
<p>Explore {{ models|length }} AI models with real-time sorting and search</p>
|
| 318 |
</header>
|
| 319 |
|
| 320 |
<div class="stats-bar">
|
| 321 |
<div class="stat">
|
| 322 |
+
<div class="stat-value">{{ models|length }}</div>
|
| 323 |
+
<div class="stat-label">Total Models</div>
|
| 324 |
</div>
|
| 325 |
<div class="stat">
|
| 326 |
+
<div class="stat-value">{{ unique_providers }}</div>
|
| 327 |
+
<div class="stat-label">Providers</div>
|
| 328 |
</div>
|
| 329 |
<div class="stat">
|
| 330 |
+
<div class="stat-value" id="visible-count">{{ models|length }}</div>
|
| 331 |
+
<div class="stat-label">Visible</div>
|
| 332 |
</div>
|
| 333 |
</div>
|
| 334 |
|
| 335 |
<div class="controls">
|
| 336 |
+
<div class="search-box">
|
| 337 |
+
<input type="text" id="searchInput" placeholder="๐ Search models, providers, or architecture...">
|
| 338 |
+
</div>
|
| 339 |
+
<a href="/api/raw" target="_blank" class="btn btn-secondary">๐ View JSON</a>
|
| 340 |
+
<a href="/api/download" class="btn btn-primary">โฌ๏ธ Download</a>
|
| 341 |
+
<a href="https://openrouter.ai" target="_blank" class="btn btn-secondary">OpenRouter โ</a>
|
| 342 |
</div>
|
| 343 |
|
| 344 |
+
<div class="table-container">
|
| 345 |
+
<table id="modelsTable">
|
| 346 |
+
<thead>
|
| 347 |
+
<tr>
|
| 348 |
+
<th onclick="sortTable(0)">Model <span class="sort-indicator">โ
</span></th>
|
| 349 |
+
<th onclick="sortTable(1)">Provider <span class="sort-indicator">โ
</span></th>
|
| 350 |
+
<th onclick="sortTable(2)">Architecture <span class="sort-indicator">โ
</span></th>
|
| 351 |
+
<th onclick="sortTable(3)" style="text-align: right;">Context <span class="sort-indicator">โ
</span></th>
|
| 352 |
+
<th onclick="sortTable(4)" style="text-align: right;">Prompt $/1M <span class="sort-indicator">โ
</span></th>
|
| 353 |
+
<th onclick="sortTable(5)" style="text-align: right;">Completion $/1M <span class="sort-indicator">โ
</span></th>
|
| 354 |
+
<th>Status</th>
|
| 355 |
+
</tr>
|
| 356 |
+
</thead>
|
| 357 |
+
<tbody>
|
| 358 |
+
{% for model in models %}
|
| 359 |
+
<tr>
|
| 360 |
+
<td>
|
| 361 |
+
<div class="model-name">{{ model.name.split('/', 1)[-1] if '/' in model.name else model.name }}</div>
|
| 362 |
+
<div class="model-id">{{ model.id }}</div>
|
| 363 |
+
</td>
|
| 364 |
+
<td>
|
| 365 |
+
<span class="badge badge-primary">{{ model.provider }}</span>
|
| 366 |
+
</td>
|
| 367 |
+
<td>
|
| 368 |
+
<div class="architecture">
|
| 369 |
+
{% for arch in model.architecture %}
|
| 370 |
+
<span class="badge badge-success">{{ arch }}</span>
|
| 371 |
+
{% endfor %}
|
| 372 |
+
</div>
|
| 373 |
+
</td>
|
| 374 |
+
<td style="text-align: right;" class="context">{{ "{:,}".format(model.context) }}</td>
|
| 375 |
+
<td style="text-align: right;" class="price">${{ "{:.4f}".format(model.prompt_price) }}</td>
|
| 376 |
+
<td style="text-align: right;" class="price">${{ "{:.4f}".format(model.completion_price) }}</td>
|
| 377 |
+
<td><span class="status">Available</span></td>
|
| 378 |
+
</tr>
|
| 379 |
+
{% endfor %}
|
| 380 |
+
</tbody>
|
| 381 |
+
</table>
|
| 382 |
+
<div id="noResults" class="no-results" style="display: none;">
|
| 383 |
+
<h3>No models found</h3>
|
| 384 |
+
<p>Try adjusting your search criteria</p>
|
| 385 |
+
</div>
|
| 386 |
+
</div>
|
| 387 |
|
| 388 |
<footer>
|
| 389 |
+
<p>Data updates every 3 hours โข Powered by OpenRouter API</p>
|
| 390 |
+
<p style="margin-top: 10px; font-size: 0.85rem;">Built with Flask on HuggingFace Spaces</p>
|
| 391 |
</footer>
|
| 392 |
</div>
|
| 393 |
|
| 394 |
<script>
|
| 395 |
+
let currentSort = { column: -1, direction: 'asc' };
|
| 396 |
+
|
| 397 |
// Search functionality
|
| 398 |
+
document.getElementById('searchInput').addEventListener('input', function(e) {
|
| 399 |
+
const searchTerm = e.target.value.toLowerCase();
|
| 400 |
+
const rows = document.querySelectorAll('#modelsTable tbody tr');
|
| 401 |
+
let visibleCount = 0;
|
| 402 |
+
|
| 403 |
+
rows.forEach(row => {
|
| 404 |
const text = row.textContent.toLowerCase();
|
| 405 |
+
if (text.includes(searchTerm)) {
|
| 406 |
+
row.style.display = '';
|
| 407 |
+
visibleCount++;
|
| 408 |
+
} else {
|
| 409 |
+
row.style.display = 'none';
|
| 410 |
+
}
|
| 411 |
});
|
| 412 |
+
|
| 413 |
+
document.getElementById('visible-count').textContent = visibleCount;
|
| 414 |
+
document.getElementById('noResults').style.display = visibleCount === 0 ? 'block' : 'none';
|
| 415 |
});
|
| 416 |
|
| 417 |
+
// Sort functionality
|
| 418 |
+
function sortTable(columnIndex) {
|
| 419 |
+
const table = document.getElementById('modelsTable');
|
| 420 |
+
const tbody = table.querySelector('tbody');
|
| 421 |
+
const rows = Array.from(tbody.querySelectorAll('tr'));
|
| 422 |
+
const headers = table.querySelectorAll('th');
|
| 423 |
+
|
| 424 |
+
// Update sort direction
|
| 425 |
+
if (currentSort.column === columnIndex) {
|
| 426 |
+
currentSort.direction = currentSort.direction === 'asc' ? 'desc' : 'asc';
|
| 427 |
+
} else {
|
| 428 |
+
currentSort.direction = 'asc';
|
| 429 |
+
currentSort.column = columnIndex;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
// Update header classes
|
| 433 |
+
headers.forEach((header, index) => {
|
| 434 |
+
header.classList.remove('sort-asc', 'sort-desc');
|
| 435 |
+
if (index === columnIndex) {
|
| 436 |
+
header.classList.add(currentSort.direction === 'asc' ? 'sort-asc' : 'sort-desc');
|
| 437 |
+
}
|
| 438 |
+
});
|
| 439 |
+
|
| 440 |
+
// Sort rows
|
| 441 |
+
rows.sort((a, b) => {
|
| 442 |
+
const aText = a.cells[columnIndex].textContent.trim();
|
| 443 |
+
const bText = b.cells[columnIndex].textContent.trim();
|
| 444 |
|
| 445 |
+
// Check if numeric
|
| 446 |
+
const aNum = parseFloat(aText.replace(/[$,]/g, ''));
|
| 447 |
+
const bNum = parseFloat(bText.replace(/[$,]/g, ''));
|
| 448 |
|
| 449 |
+
let comparison;
|
| 450 |
+
if (!isNaN(aNum) && !isNaN(bNum)) {
|
| 451 |
+
comparison = aNum - bNum;
|
| 452 |
+
} else {
|
| 453 |
+
comparison = aText.localeCompare(bText);
|
| 454 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 455 |
|
| 456 |
+
return currentSort.direction === 'asc' ? comparison : -comparison;
|
| 457 |
});
|
| 458 |
+
|
| 459 |
+
// Reorder rows
|
| 460 |
+
rows.forEach(row => tbody.appendChild(row));
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
// Auto-refresh indicator
|
| 464 |
+
let lastUpdate = new Date();
|
| 465 |
+
setInterval(() => {
|
| 466 |
+
const now = new Date();
|
| 467 |
+
const elapsed = Math.floor((now - lastUpdate) / 1000);
|
| 468 |
+
const hours = Math.floor(elapsed / 3600);
|
| 469 |
+
const minutes = Math.floor((elapsed % 3600) / 60);
|
| 470 |
+
|
| 471 |
+
// Could update a "last updated" timestamp here
|
| 472 |
+
}, 60000); // Every minute
|
| 473 |
</script>
|
| 474 |
</body>
|
| 475 |
</html>
|