datasetmodelhub / app.js
AEUPH's picture
Static host: client-side bundle (sdk: static)
3d36973 verified
Raw History Blame Contribute Delete
5.13 kB
/* Silicon Factory hub — data + rendering, client side.
*
* The Python app this replaces read `models.json` from disk at import and rendered two
* Markdown tables. A static page cannot read the host's filesystem, so the array below IS
* the database: it is the only thing to edit when adding a published model or dataset.
*
* SEED DATA — replace with your real rows. Every `murl` points at a repository that exists
* on the AEUPH account; where a dataset was never published the `durl` is "#" and the row
* is marked, and `entries`/`date` for those rows are placeholders rather than measurements.
*/
var MODELS = [
{ name: "synthetic_Jailbreak_Defense_Doorpage_v62",
murl: "https://huggingface.co/AEUPH/synthetic_Jailbreak_Defense_Doorpage_v13-model",
durl: "https://huggingface.co/datasets/AEUPH/synthetic_Jailbreak_Defense_Doorpage_v62",
focus: "Safety / refusal alignment", entries: 1450, date: "2026-10-12" },
{ name: "SDXL UNet GGUF quantisation set",
murl: "https://huggingface.co/AEUPH/sdxl-unet-q8-gguf",
durl: "#",
focus: "Diffusion UNet GGUF (Q4_0/Q8_0/F16/F32)", entries: 8, date: "2026-08-04" },
{ name: "BRUTE-AI self-prompting transcripts",
murl: "https://huggingface.co/spaces/AEUPH/BRUTE-AI",
durl: "#",
focus: "Agentic self-prompting / injection loop", entries: 250, date: "2025-11-02" },
{ name: "Hyper-dimensional lexicon generator",
murl: "https://huggingface.co/spaces/AEUPH/HIGHER-DIMENSIONAL-LEXICON-GENERATOR",
durl: "#",
focus: "HDC/VSA vocabulary encoding", entries: 1024, date: "2025-09-09" },
{ name: "Quantum cognition chat prompts",
murl: "https://huggingface.co/spaces/AEUPH/QUANTUM_COGNITION_CHAT_AI",
durl: "#",
focus: "Quantum-inspired reasoning", entries: 320, date: "2025-06-18" },
{ name: "SDXL VAE / text-encoder checkpoints",
murl: "https://huggingface.co/AEUPH/pornworks-v04-te-vae-sdxl",
durl: "#",
focus: "SDXL text encoder + VAE", entries: 4, date: "2026-05-30" }
];
var BUY_URL = "https://buy.stripe.com/3cIcN4gzC7lXfuH49s7wA00";
function esc(s) {
return String(s === undefined || s === null ? "" : s)
.replace(/[&<>"]/g, function (c) {
return ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[c];
});
}
/* Same derivation as the Python: the free-inference target is the model path itself. */
function freeInferenceUrl(m) {
var path = String(m.murl || "").replace("https://huggingface.co/", "");
return "https://huggingface.co/" + path;
}
function modelLabel(m) {
return String(m.murl || "#").split("/").pop();
}
function link(url, text, cls) {
if (!url || url === "#") return esc(text) + " <span class=\"sub\">(not published)</span>";
return '<a' + (cls ? ' class="' + cls + '"' : "") + ' href="' + esc(url) + '" target="_blank" rel="noopener">' +
esc(text) + "</a>";
}
function render() {
document.getElementById("count").innerHTML =
"<b>Total models published: " + MODELS.length + "</b> · rendered from an embedded array, no server";
var free = ['<table><thead><tr><th>#</th><th>Model</th><th>Dataset</th><th>Focus</th>' +
'<th>Entries</th><th>Free Inference</th></tr></thead><tbody>'];
for (var i = 0; i < MODELS.length; i++) {
var m = MODELS[i];
free.push("<tr><td>" + (i + 1) + "</td>" +
"<td>" + link(m.murl, modelLabel(m)) + "</td>" +
"<td>" + link(m.durl, m.name || "N/A") + "</td>" +
"<td>" + esc(m.focus || "N/A") + "</td>" +
"<td>" + esc(m.entries || 0) + "</td>" +
"<td>" + link(freeInferenceUrl(m), "🆓 Try Free") + "</td></tr>");
}
free.push("</tbody></table>");
document.getElementById("freeTable").innerHTML = free.join("");
var buy = ['<table><thead><tr><th>#</th><th>Dataset</th><th>Model</th><th>Focus</th>' +
'<th>Entries</th><th>Date</th><th>Buy</th></tr></thead><tbody>'];
for (var j = 0; j < MODELS.length; j++) {
var b = MODELS[j];
buy.push("<tr><td>" + (j + 1) + "</td>" +
"<td>" + link(b.durl, b.name || "N/A") + "</td>" +
"<td>" + link(b.murl, modelLabel(b)) + "</td>" +
"<td>" + esc(b.focus || "N/A") + "</td>" +
"<td>" + esc(b.entries || 0) + "</td>" +
"<td>" + esc(b.date || "N/A") + "</td>" +
'<td><a class="buy" href="' + BUY_URL + '" target="_blank" rel="noopener">💳 Buy $2,500</a></td></tr>');
}
buy.push("</tbody></table>");
document.getElementById("buyTable").innerHTML = buy.join("");
}
function exportJson() {
var blob = new Blob([JSON.stringify(MODELS, null, 2)], { type: "application/json" });
var a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "models.json";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
document.getElementById("exportBtn").addEventListener("click", exportJson);
document.getElementById("toggleBtn").addEventListener("click", function () {
var pre = document.getElementById("raw");
var show = pre.style.display === "none";
pre.style.display = show ? "block" : "none";
pre.textContent = show ? JSON.stringify(MODELS, null, 2) : "";
});
render();