Delete index.html
Browse files- index.html +0 -318
index.html
DELETED
|
@@ -1,318 +0,0 @@
|
|
| 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">
|
| 6 |
-
<title>VeroLM</title>
|
| 7 |
-
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='525 200 500 630'%3E%3Cpolygon fill='%23e10b17' points='537,340 626,304 626,594 537,528'/%3E%3Cpolygon fill='%23e10b17' points='665,314 803,265 803,703 665,614'/%3E%3Cpolygon fill='%23e10b17' points='840,270 1012,212 1012,817 840,710'/%3E%3C/svg%3E">
|
| 8 |
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
-
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@400;600;800&display=swap" rel="stylesheet">
|
| 11 |
-
<style>
|
| 12 |
-
:root{
|
| 13 |
-
--bg:#ececee; --fg:#141416; --mut:#5d5d65; --line:#cfcfd4; --line2:#8d8d95; --card:#f6f6f7;
|
| 14 |
-
--plate:transparent; --blue:#2563eb; --green:#16a34a;
|
| 15 |
-
--font:"Sora",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
|
| 16 |
-
}
|
| 17 |
-
@media (prefers-color-scheme: dark){
|
| 18 |
-
:root{ --bg:#111113; --fg:#ececee; --mut:#9b9ba3; --line:#2c2c31; --line2:#55555d; --card:#1a1a1d; --plate:#ececee; --blue:#3b82f6; --green:#22c55e; }
|
| 19 |
-
}
|
| 20 |
-
*{box-sizing:border-box}
|
| 21 |
-
html{scroll-behavior:smooth}
|
| 22 |
-
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font);line-height:1.6;-webkit-font-smoothing:antialiased}
|
| 23 |
-
a{color:inherit}
|
| 24 |
-
:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
|
| 25 |
-
.wrap{max-width:1040px;margin:0 auto;padding:0 24px}
|
| 26 |
-
|
| 27 |
-
/* logo */
|
| 28 |
-
.l-ink{fill:#0c0c0f}
|
| 29 |
-
.l-red{fill:url(#redg)}
|
| 30 |
-
.logo{display:block;background:var(--plate);border-radius:18px;padding:26px;box-sizing:border-box}
|
| 31 |
-
|
| 32 |
-
header{display:flex;align-items:center;justify-content:space-between;padding:20px 0}
|
| 33 |
-
.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:1.15rem;letter-spacing:-.01em;text-decoration:none}
|
| 34 |
-
.brand svg{width:36px;height:44px;background:var(--plate);border-radius:7px;padding:5px;box-sizing:border-box}
|
| 35 |
-
nav{display:flex;align-items:center;gap:8px}
|
| 36 |
-
.chip{font:inherit;font-size:.85rem;color:var(--fg);background:transparent;border:1px solid var(--line);border-radius:999px;padding:6px 14px;cursor:pointer;text-decoration:none;display:inline-block}
|
| 37 |
-
.chip:hover{border-color:var(--mut)}
|
| 38 |
-
select.chip{appearance:none;-webkit-appearance:none;background-color:var(--bg);padding-right:26px;background-repeat:no-repeat;background-position:right 11px center;background-size:9px 6px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' fill='none' stroke='%238d8d95' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
|
| 39 |
-
|
| 40 |
-
.hero{display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:40px;padding:56px 0 72px}
|
| 41 |
-
.hero h1{font-size:clamp(2.4rem,6vw,4.4rem);line-height:1.02;letter-spacing:-.035em;font-weight:800;margin:0 0 20px}
|
| 42 |
-
.hero p{max-width:46ch;color:var(--mut);font-size:1.08rem;margin:0 0 28px}
|
| 43 |
-
.cta{display:flex;gap:10px;flex-wrap:wrap}
|
| 44 |
-
.btn{font:inherit;font-weight:600;font-size:.9rem;border:0;border-radius:8px;padding:10px 18px;cursor:pointer;color:#fff;text-decoration:none;display:inline-block}
|
| 45 |
-
.btn.blue{background:var(--blue)} .btn.green{background:var(--green)}
|
| 46 |
-
.btn:hover{filter:brightness(1.1)}
|
| 47 |
-
.btn[disabled]{opacity:.5;cursor:wait}
|
| 48 |
-
.btn.ghost{background:transparent;color:var(--fg);border:1px solid var(--line)}
|
| 49 |
-
.hero svg{width:min(100%,300px);height:auto;justify-self:center}
|
| 50 |
-
.b{transform-box:fill-box;transform-origin:bottom;animation:rise .9s cubic-bezier(.2,.8,.2,1) both}
|
| 51 |
-
.b2{animation-delay:.12s}.b3{animation-delay:.24s}
|
| 52 |
-
@keyframes rise{from{transform:scaleY(.15);opacity:0}to{transform:none;opacity:1}}
|
| 53 |
-
@media (prefers-reduced-motion: reduce){.b{animation:none}}
|
| 54 |
-
|
| 55 |
-
section{padding:40px 0}
|
| 56 |
-
h2{font-size:1.7rem;letter-spacing:-.02em;margin:0 0 6px}
|
| 57 |
-
.sub{color:var(--mut);margin:0 0 28px;max-width:60ch}
|
| 58 |
-
|
| 59 |
-
/* series + models */
|
| 60 |
-
.series{margin-bottom:36px}
|
| 61 |
-
.series h3{display:flex;align-items:baseline;gap:12px;margin:0 0 14px;font-size:1.15rem;border-bottom:1px solid var(--line);padding-bottom:10px}
|
| 62 |
-
.series h3 a{text-decoration:none}
|
| 63 |
-
.series h3 a:hover{text-decoration:underline}
|
| 64 |
-
.series .desc{color:var(--mut);margin:0 0 14px;max-width:70ch;font-size:.95rem}
|
| 65 |
-
.series h3 small{color:var(--mut);font-weight:400;font-size:.85rem}
|
| 66 |
-
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
|
| 67 |
-
.card{background:var(--card);border:1px solid var(--line);border-left:4px solid var(--line2);border-radius:6px;padding:18px;display:flex;flex-direction:column;gap:10px}
|
| 68 |
-
.card h4{margin:0;font-size:1rem;word-break:break-word}
|
| 69 |
-
.meta{display:flex;flex-wrap:wrap;gap:6px;font-size:.78rem;color:var(--mut)}
|
| 70 |
-
.meta span{border:1px solid var(--line);border-radius:4px;padding:1px 8px}
|
| 71 |
-
.card .act{display:flex;gap:8px;margin-top:auto;padding-top:6px}
|
| 72 |
-
.empty{text-align:center;padding:48px 16px;color:var(--mut)}
|
| 73 |
-
.empty strong{display:block;color:var(--fg);font-size:1.2rem;margin-bottom:6px}
|
| 74 |
-
.skel{height:130px;border-radius:6px;background:linear-gradient(90deg,var(--card),var(--line),var(--card));background-size:200% 100%;animation:sh 1.4s infinite}
|
| 75 |
-
@keyframes sh{to{background-position:-200% 0}}
|
| 76 |
-
|
| 77 |
-
/* approach */
|
| 78 |
-
.pr{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:28px}
|
| 79 |
-
.pr h3{margin:0 0 6px;font-size:1rem}
|
| 80 |
-
.pr p{margin:0;color:var(--mut);font-size:.95rem}
|
| 81 |
-
|
| 82 |
-
footer{border-top:1px solid var(--line);margin-top:48px;padding:28px 0 48px;color:var(--mut);font-size:.9rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
|
| 83 |
-
|
| 84 |
-
/* run dialog */
|
| 85 |
-
dialog{border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--fg);width:min(640px,92vw);padding:24px;font-family:var(--font)}
|
| 86 |
-
dialog::backdrop{background:rgba(0,0,0,.55)}
|
| 87 |
-
dialog h3{margin:0 0 4px;word-break:break-all}
|
| 88 |
-
#rstat{color:var(--mut);font-size:.88rem;margin:0 0 14px;min-height:1.4em}
|
| 89 |
-
textarea{width:100%;min-height:90px;font:inherit;font-size:.95rem;background:var(--bg);color:var(--fg);border:1px solid var(--line);border-radius:6px;padding:10px;resize:vertical}
|
| 90 |
-
#rout{white-space:pre-wrap;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:12px;margin-top:12px;min-height:60px;max-height:260px;overflow:auto;font-size:.92rem}
|
| 91 |
-
.drow{display:flex;gap:8px;margin-top:12px;justify-content:flex-end}
|
| 92 |
-
|
| 93 |
-
@media (max-width:760px){
|
| 94 |
-
.hero{grid-template-columns:1fr;padding-top:24px}
|
| 95 |
-
.hero svg{width:120px;order:-1;justify-self:start}
|
| 96 |
-
}
|
| 97 |
-
</style>
|
| 98 |
-
</head>
|
| 99 |
-
<body>
|
| 100 |
-
|
| 101 |
-
<!-- Logo definition: transparent background, the dark parts adapt to the theme -->
|
| 102 |
-
<svg width="0" height="0" style="position:absolute;overflow:hidden" aria-hidden="true">
|
| 103 |
-
<defs>
|
| 104 |
-
<linearGradient id="redg" x1="0" y1="0" x2="0" y2="1">
|
| 105 |
-
<stop offset="0" stop-color="#ee0f1a"/>
|
| 106 |
-
<stop offset="1" stop-color="#860000"/>
|
| 107 |
-
</linearGradient>
|
| 108 |
-
<symbol id="logo" viewBox="525 200 500 630" width="100%" height="100%">
|
| 109 |
-
<g class="b b1"><polygon class="l-ink" points="537,340 626,304 626,594 537,528"/><path class="l-red" d="M537 362Q580 450 612 522Q622 545 626 594L537 528Z"/></g>
|
| 110 |
-
<g class="b b2"><polygon class="l-ink" points="665,314 803,265 803,703 665,614"/><path class="l-red" d="M803 375L692 503Q680 517 680 535L680 624L803 703Z"/></g>
|
| 111 |
-
<g class="b b3"><polygon class="l-ink" points="840,270 1012,212 1012,817 840,710"/><path class="l-red" d="M1012 346L866 506Q855 518 855 534L855 719L1012 817Z"/></g>
|
| 112 |
-
</symbol>
|
| 113 |
-
</defs>
|
| 114 |
-
</svg>
|
| 115 |
-
|
| 116 |
-
<div class="wrap">
|
| 117 |
-
<header>
|
| 118 |
-
<a class="brand" href="#top" aria-label="VeroLM">
|
| 119 |
-
<svg viewBox="0 0 500 630" aria-hidden="true"><use href="#logo"/></svg>
|
| 120 |
-
VeroLM
|
| 121 |
-
</a>
|
| 122 |
-
<nav>
|
| 123 |
-
<a class="chip" href="#models" data-t="navModels">Models</a>
|
| 124 |
-
<a class="chip" id="hflink" href="#" target="_blank" rel="noopener">Hugging Face</a>
|
| 125 |
-
<select class="chip" id="lang" aria-label="Language"><option value="en">English</option><option value="tr">Türkçe</option><option value="fr">Français</option><option value="es">Español</option></select>
|
| 126 |
-
</nav>
|
| 127 |
-
</header>
|
| 128 |
-
|
| 129 |
-
<div class="hero" id="top">
|
| 130 |
-
<div>
|
| 131 |
-
<h1 data-t="h1">Open models at every size.</h1>
|
| 132 |
-
<p data-t="lead">Hızlı, verimli ve çoğunlukla açık kaynak. Küçükten büyüğe dil modelleri eğitiyor, herkesin ücretsiz kullanabilmesi için yayınlıyoruz.</p>
|
| 133 |
-
<div class="cta">
|
| 134 |
-
<a class="btn blue" href="#models" data-t="ctaModels">Browse models</a>
|
| 135 |
-
<a class="btn ghost" id="hflink2" href="#" target="_blank" rel="noopener" data-t="ctaHF">Follow on Hugging Face</a>
|
| 136 |
-
</div>
|
| 137 |
-
</div>
|
| 138 |
-
<svg class="logo" viewBox="0 0 500 630" role="img" aria-label="VeroLM logosu"><use href="#logo"/></svg>
|
| 139 |
-
</div>
|
| 140 |
-
|
| 141 |
-
<section id="models">
|
| 142 |
-
<h2 data-t="hModels">Series and models</h2>
|
| 143 |
-
<p class="sub" data-t="subModels">Hugging Face’teki güncel modellerimiz. İncele ile model sayfasını aç, Çalıştır ile tarayıcında dene.</p>
|
| 144 |
-
<div id="list"><div class="grid"><div class="skel"></div><div class="skel"></div><div class="skel"></div></div></div>
|
| 145 |
-
</section>
|
| 146 |
-
|
| 147 |
-
<section>
|
| 148 |
-
<h2 data-t="hAbout">Yaklaşımımız</h2>
|
| 149 |
-
<p class="sub" data-t="subAbout">VeroLM, bağımsız bir yapay zeka laboratuvarı.</p>
|
| 150 |
-
<div class="pr">
|
| 151 |
-
<div><h3 data-t="p1h">Önce kalite</h3><p data-t="p1">Sadece var olan değil, gerçekten iyi çalışan modeller üretiyoruz.</p></div>
|
| 152 |
-
<div><h3 data-t="p2h">Hız ve verimlilik</h3><p data-t="p2">Her model, insanların elindeki donanımda çalışacak şekilde olabildiğince hızlı ve optimize.</p></div>
|
| 153 |
-
<div><h3 data-t="p3h">Varsayılan olarak açık</h3><p data-t="p3">Eğittiklerimizin çoğu açık kaynak ve ücretsiz. İyi yapay zeka ücretli duvarların arkasında kalmamalı.</p></div>
|
| 154 |
-
<div><h3 data-t="p4h">Deneysellik</h3><p data-t="p4">Mimari, eğitim ve optimizasyonda az denenmiş fikirleri sürekli deniyoruz.</p></div>
|
| 155 |
-
</div>
|
| 156 |
-
</section>
|
| 157 |
-
|
| 158 |
-
<footer>
|
| 159 |
-
<span>© VeroLM</span>
|
| 160 |
-
<span data-t="foot">Merakla geliştirildi, herkes için yayınlandı.</span>
|
| 161 |
-
</footer>
|
| 162 |
-
</div>
|
| 163 |
-
|
| 164 |
-
<dialog id="dlg">
|
| 165 |
-
<h3 id="rname"></h3>
|
| 166 |
-
<p id="rstat"></p>
|
| 167 |
-
<textarea id="rin" data-t-ph="phPrompt" placeholder="Bir şey yaz..."></textarea>
|
| 168 |
-
<div id="rout" hidden></div>
|
| 169 |
-
<div class="drow">
|
| 170 |
-
<button class="btn ghost" id="rclose" type="button" data-t="close">Kapat</button>
|
| 171 |
-
<button class="btn green" id="rgo" type="button" data-t="run">Çalıştır</button>
|
| 172 |
-
</div>
|
| 173 |
-
</dialog>
|
| 174 |
-
|
| 175 |
-
<script>
|
| 176 |
-
const ORG = "VeroLM"; // Hugging Face organization name
|
| 177 |
-
|
| 178 |
-
const T = {
|
| 179 |
-
en:{navModels:"Models",h1:"Open models at every size.",lead:"Fast, efficient and mostly open source. We train language models from tiny to large and release them for everyone to use for free.",ctaModels:"Browse models",ctaHF:"Follow on Hugging Face",hModels:"Series and models",subModels:"Our current models on Hugging Face. Inspect opens the model page, Run tries it in your browser.",hAbout:"Our approach",subAbout:"VeroLM is an independent AI lab.",p1h:"Quality first",p1:"We build models that genuinely perform, not just models that exist.",p2h:"Speed and efficiency",p2:"Every model is as fast and optimized as we can make it, so it runs on the hardware people actually have.",p3h:"Open by default",p3:"Most of what we train is open source and free. Good AI shouldn’t sit behind a paywall.",p4h:"Experimentation",p4:"We constantly try rarely explored ideas in architecture, training and optimization.",foot:"Built with curiosity, released for everyone.",
|
| 180 |
-
inspect:"Inspect",run:"Run",close:"Close",model:"model",models:"models",dl:"downloads",oopsT:"Oops, no models here yet.",oopsB:"New releases will show up here as soon as they’re published.",phPrompt:"Type something...",
|
| 181 |
-
sNoGpu:"WebGPU isn’t available in this browser, so the slower CPU mode will be used.",sGpu:"WebGPU is ready. The first run downloads the model and keeps it in your browser.",sLoad:"Loading model",sReady:"Model ready.",sGen:"Generating...",sErr:"Couldn’t open this model in the browser. It may not be published in a browser-ready (ONNX) format yet."},
|
| 182 |
-
tr:{navModels:"Modeller",h1:"Her boyutta açık modeller.",lead:"Hızlı, verimli ve çoğunlukla açık kaynak. Küçükten büyüğe dil modelleri eğitiyor, herkesin ücretsiz kullanabilmesi için yayınlıyoruz.",ctaModels:"Modelleri incele",ctaHF:"Hugging Face’te takip et",hModels:"Seriler ve modeller",subModels:"Hugging Face’teki güncel modellerimiz. İncele ile model sayfasını aç, Çalıştır ile tarayıcında dene.",hAbout:"Yaklaşımımız",subAbout:"VeroLM, bağımsız bir yapay zeka laboratuvarı.",p1h:"Önce kalite",p1:"Sadece var olan değil, gerçekten iyi çalışan modeller üretiyoruz.",p2h:"Hız ve verimlilik",p2:"Her model, insanların elindeki donanımda çalışacak şekilde olabildiğince hızlı ve optimize.",p3h:"Varsayılan olarak açık",p3:"Eğittiklerimizin çoğu açık kaynak ve ücretsiz. İyi yapay zeka ücretli duvarların arkasında kalmamalı.",p4h:"Deneysellik",p4:"Mimari, eğitim ve optimizasyonda az denenmiş fikirleri sürekli deniyoruz.",foot:"Merakla geliştirildi, herkes için yayınlandı.",
|
| 183 |
-
inspect:"İncele",run:"Çalıştır",close:"Kapat",model:"model",models:"model",dl:"indirme",oopsT:"Oops, burada henüz model yok.",oopsB:"Yeni modeller yayınlandığında burada görünecek.",phPrompt:"Bir şey yaz...",
|
| 184 |
-
sNoGpu:"Bu tarayıcıda WebGPU yok, daha yavaş olan CPU modu kullanılacak.",sGpu:"WebGPU hazır. İlk çalıştırmada model indirilir ve tarayıcıda saklanır.",sLoad:"Model yükleniyor",sReady:"Model hazır.",sGen:"Yanıt üretiliyor...",sErr:"Model tarayıcıda açılamadı. Bu model henüz tarayıcı (ONNX) biçiminde yayınlanmamış olabilir."},
|
| 185 |
-
fr:{navModels:"Modèles",h1:"Des modèles ouverts, à toutes les tailles.",lead:"Rapides, efficaces et surtout open source. Nous entraînons des modèles de langage du plus petit au plus grand et les publions pour que tout le monde puisse les utiliser gratuitement.",ctaModels:"Voir les modèles",ctaHF:"Suivre sur Hugging Face",hModels:"Séries et modèles",subModels:"Nos modèles actuels sur Hugging Face. Examiner ouvre la page du modèle, Exécuter l’essaie dans votre navigateur.",hAbout:"Notre approche",subAbout:"VeroLM est un laboratoire d’IA indépendant.",p1h:"La qualité d’abord",p1:"Nous construisons des modèles qui performent vraiment, pas seulement des modèles qui existent.",p2h:"Vitesse et efficacité",p2:"Chaque modèle est aussi rapide et optimisé que possible, pour tourner sur le matériel que les gens ont vraiment.",p3h:"Ouvert par défaut",p3:"La plupart de nos modèles sont open source et gratuits. Une bonne IA ne devrait pas être derrière un paywall.",p4h:"Expérimentation",p4:"Nous testons sans cesse des idées peu explorées en architecture, entraînement et optimisation.",foot:"Créé avec curiosité, publié pour tous.",
|
| 186 |
-
inspect:"Examiner",run:"Exécuter",close:"Fermer",model:"modèle",models:"modèles",dl:"téléchargements",oopsT:"Oups, aucun modèle ici pour l’instant.",oopsB:"Les nouvelles versions apparaîtront ici dès leur publication.",phPrompt:"Écrivez quelque chose...",
|
| 187 |
-
sNoGpu:"WebGPU n’est pas disponible dans ce navigateur, le mode CPU, plus lent, sera utilisé.",sGpu:"WebGPU est prêt. Le premier lancement télécharge le modèle et le conserve dans votre navigateur.",sLoad:"Chargement du modèle",sReady:"Modèle prêt.",sGen:"Génération en cours...",sErr:"Impossible d’ouvrir ce modèle dans le navigateur. Il n’est peut-être pas encore publié au format ONNX."},
|
| 188 |
-
es:{navModels:"Modelos",h1:"Modelos abiertos de todos los tamaños.",lead:"Rápidos, eficientes y en su mayoría de código abierto. Entrenamos modelos de lenguaje, de pequeños a grandes, y los publicamos para que todos puedan usarlos gratis.",ctaModels:"Ver modelos",ctaHF:"Seguir en Hugging Face",hModels:"Series y modelos",subModels:"Nuestros modelos actuales en Hugging Face. Inspeccionar abre la página del modelo, Ejecutar lo prueba en tu navegador.",hAbout:"Nuestro enfoque",subAbout:"VeroLM es un laboratorio de IA independiente.",p1h:"Primero la calidad",p1:"Construimos modelos que realmente funcionan bien, no solo modelos que existen.",p2h:"Velocidad y eficiencia",p2:"Cada modelo es tan rápido y optimizado como podemos, para que funcione en el hardware que la gente realmente tiene.",p3h:"Abierto por defecto",p3:"La mayoría de lo que entrenamos es de código abierto y gratuito. La buena IA no debería estar detrás de un muro de pago.",p4h:"Experimentación",p4:"Probamos constantemente ideas poco exploradas en arquitectura, entrenamiento y optimización.",foot:"Hecho con curiosidad, publicado para todos.",
|
| 189 |
-
inspect:"Inspeccionar",run:"Ejecutar",close:"Cerrar",model:"modelo",models:"modelos",dl:"descargas",oopsT:"Vaya, aún no hay modelos aquí.",oopsB:"Las nuevas versiones aparecerán aquí en cuanto se publiquen.",phPrompt:"Escribe algo...",
|
| 190 |
-
sNoGpu:"WebGPU no está disponible en este navegador, se usará el modo CPU, más lento.",sGpu:"WebGPU está listo. La primera ejecución descarga el modelo y lo guarda en tu navegador.",sLoad:"Cargando modelo",sReady:"Modelo listo.",sGen:"Generando...",sErr:"No se pudo abrir este modelo en el navegador. Puede que aún no esté publicado en formato ONNX."}
|
| 191 |
-
};
|
| 192 |
-
let lang = "en";
|
| 193 |
-
const $ = s => document.querySelector(s);
|
| 194 |
-
const t = k => T[lang][k];
|
| 195 |
-
|
| 196 |
-
function applyLang(){
|
| 197 |
-
document.documentElement.lang = lang;
|
| 198 |
-
document.querySelectorAll("[data-t]").forEach(n => n.textContent = t(n.dataset.t));
|
| 199 |
-
document.querySelectorAll("[data-t-ph]").forEach(n => n.placeholder = t(n.dataset.tPh));
|
| 200 |
-
$("#lang").value = lang;
|
| 201 |
-
render();
|
| 202 |
-
}
|
| 203 |
-
$("#lang").onchange = e => { lang = e.target.value; applyLang(); };
|
| 204 |
-
["#hflink","#hflink2"].forEach(s => $(s).href = "https://huggingface.co/" + ORG);
|
| 205 |
-
|
| 206 |
-
/* ---- series = Hugging Face collections of the organization ---- */
|
| 207 |
-
let SERIES = null;
|
| 208 |
-
const unit = {k:.001,m:1,b:1000};
|
| 209 |
-
function sizeOf(name){
|
| 210 |
-
const m = name.match(/(\d+(?:\.\d+)?)\s?([kmb])\b/i);
|
| 211 |
-
return m ? m[1]+m[2].toUpperCase() : null;
|
| 212 |
-
}
|
| 213 |
-
function fmt(n){ return n>=1e6 ? (n/1e6).toFixed(1)+"M" : n>=1e3 ? (n/1e3).toFixed(1)+"K" : String(n); }
|
| 214 |
-
function el(tag, props = {}, ...kids){
|
| 215 |
-
const e = Object.assign(document.createElement(tag), props);
|
| 216 |
-
kids.flat().forEach(k => e.append(k));
|
| 217 |
-
return e;
|
| 218 |
-
}
|
| 219 |
-
|
| 220 |
-
async function load(){
|
| 221 |
-
try{
|
| 222 |
-
// The list endpoint truncates each collection to 4 items, so fetch every collection again for its full item list.
|
| 223 |
-
const r = await fetch("https://huggingface.co/api/collections?owner=" + encodeURIComponent(ORG) + "&limit=100&sort=lastModified");
|
| 224 |
-
if(!r.ok) throw 0;
|
| 225 |
-
const list = await r.json();
|
| 226 |
-
const full = await Promise.all(list.map(async c => {
|
| 227 |
-
try{
|
| 228 |
-
const d = await fetch("https://huggingface.co/api/collections/" + c.slug);
|
| 229 |
-
return d.ok ? await d.json() : c;
|
| 230 |
-
}catch(e){ return c; }
|
| 231 |
-
}));
|
| 232 |
-
SERIES = full
|
| 233 |
-
.map(c => ({
|
| 234 |
-
title: c.title, desc: c.description || "", url: "https://huggingface.co/collections/" + c.slug,
|
| 235 |
-
models: (c.items || []).filter(i => i.type === "model")
|
| 236 |
-
}))
|
| 237 |
-
.filter(c => c.models.length);
|
| 238 |
-
}catch(e){ SERIES = []; }
|
| 239 |
-
render();
|
| 240 |
-
}
|
| 241 |
-
|
| 242 |
-
function render(){
|
| 243 |
-
const box = $("#list");
|
| 244 |
-
if(SERIES === null) return;
|
| 245 |
-
box.replaceChildren();
|
| 246 |
-
if(!SERIES.length){
|
| 247 |
-
box.append(el("div",{className:"empty"}, el("strong",{textContent:t("oopsT")}), el("span",{textContent:t("oopsB")})));
|
| 248 |
-
return;
|
| 249 |
-
}
|
| 250 |
-
SERIES.forEach(sr => {
|
| 251 |
-
const grid = el("div",{className:"grid"});
|
| 252 |
-
sr.models.forEach(m => {
|
| 253 |
-
const name = m.id.split("/").pop();
|
| 254 |
-
const size = sizeOf(name);
|
| 255 |
-
const meta = el("div",{className:"meta"});
|
| 256 |
-
if(size) meta.append(el("span",{textContent:size}));
|
| 257 |
-
if(m.pipeline_tag) meta.append(el("span",{textContent:m.pipeline_tag}));
|
| 258 |
-
if(m.downloads != null) meta.append(el("span",{textContent:fmt(m.downloads)+" "+t("dl")}));
|
| 259 |
-
const run = el("button",{className:"btn green",type:"button",textContent:t("run")});
|
| 260 |
-
run.onclick = () => openRun(m.id);
|
| 261 |
-
grid.append(el("div",{className:"card"},
|
| 262 |
-
el("h4",{textContent:name}), meta,
|
| 263 |
-
el("div",{className:"act"},
|
| 264 |
-
el("a",{className:"btn blue",href:"https://huggingface.co/"+m.id,target:"_blank",rel:"noopener",textContent:t("inspect")}),
|
| 265 |
-
run)));
|
| 266 |
-
});
|
| 267 |
-
const n = sr.models.length;
|
| 268 |
-
box.append(el("div",{className:"series"},
|
| 269 |
-
el("h3",{}, el("a",{href:sr.url,target:"_blank",rel:"noopener",textContent:sr.title}), el("small",{textContent:n+" "+(n===1?t("model"):t("models"))})),
|
| 270 |
-
sr.desc ? el("p",{className:"desc",textContent:sr.desc}) : "",
|
| 271 |
-
grid));
|
| 272 |
-
});
|
| 273 |
-
}
|
| 274 |
-
|
| 275 |
-
/* ---- run in browser (Transformers.js + WebGPU) ---- */
|
| 276 |
-
let current = null; const pipes = new Map(); let lib = null;
|
| 277 |
-
function openRun(id){
|
| 278 |
-
current = id;
|
| 279 |
-
$("#rname").textContent = id;
|
| 280 |
-
$("#rout").hidden = true; $("#rout").textContent = "";
|
| 281 |
-
$("#rstat").textContent = navigator.gpu ? t("sGpu") : t("sNoGpu");
|
| 282 |
-
$("#rgo").disabled = false;
|
| 283 |
-
$("#dlg").showModal();
|
| 284 |
-
}
|
| 285 |
-
$("#rclose").onclick = () => $("#dlg").close();
|
| 286 |
-
$("#rgo").onclick = async () => {
|
| 287 |
-
const go = $("#rgo"), out = $("#rout"), stat = $("#rstat");
|
| 288 |
-
const prompt = $("#rin").value.trim();
|
| 289 |
-
if(!prompt) return;
|
| 290 |
-
go.disabled = true; out.hidden = false; out.textContent = "";
|
| 291 |
-
try{
|
| 292 |
-
if(!lib) lib = await import("https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.2");
|
| 293 |
-
if(!pipes.has(current)){
|
| 294 |
-
stat.textContent = t("sLoad") + "...";
|
| 295 |
-
const gpu = !!navigator.gpu;
|
| 296 |
-
pipes.set(current, await lib.pipeline("text-generation", current, {
|
| 297 |
-
device: gpu ? "webgpu" : "wasm",
|
| 298 |
-
dtype: gpu ? "q4" : "q8",
|
| 299 |
-
progress_callback: p => { if(p.status === "progress") stat.textContent = t("sLoad") + " " + Math.round(p.progress||0) + "%"; }
|
| 300 |
-
}));
|
| 301 |
-
}
|
| 302 |
-
const gen = pipes.get(current);
|
| 303 |
-
stat.textContent = t("sGen");
|
| 304 |
-
const streamer = new lib.TextStreamer(gen.tokenizer, {skip_prompt:true, callback_function: s => { out.textContent += s; }});
|
| 305 |
-
await gen([{role:"user", content:prompt}], {max_new_tokens:256, do_sample:false, streamer});
|
| 306 |
-
stat.textContent = t("sReady");
|
| 307 |
-
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