Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +4 -3
index.html
CHANGED
|
@@ -199,7 +199,8 @@
|
|
| 199 |
<script src="data.js"></script>
|
| 200 |
<script>
|
| 201 |
const D = window.WORKFLOW_DATA;
|
| 202 |
-
const
|
|
|
|
| 203 |
|
| 204 |
function esc(s) {
|
| 205 |
return (s || "").replace(/&/g, "&").replace(/</g, "<")
|
|
@@ -228,7 +229,7 @@ async function openModal(file) {
|
|
| 228 |
document.getElementById("modal-pre").textContent = "Fetching…";
|
| 229 |
document.getElementById("overlay").classList.add("open");
|
| 230 |
try {
|
| 231 |
-
const r = await fetch(
|
| 232 |
if (!r.ok) throw new Error(r.status);
|
| 233 |
const txt = await r.text();
|
| 234 |
const pretty = JSON.stringify(JSON.parse(txt), null, 1);
|
|
@@ -307,7 +308,7 @@ function wfCard(w) {
|
|
| 307 |
</div>
|
| 308 |
<div class="actions">
|
| 309 |
<button class="btn primary" onclick="openModal('${w.file}')">Preview JSON</button>
|
| 310 |
-
<a class="btn" style="display:inline-flex;align-items:center" href="${
|
| 311 |
</div>
|
| 312 |
</div>`;
|
| 313 |
}
|
|
|
|
| 199 |
<script src="data.js"></script>
|
| 200 |
<script>
|
| 201 |
const D = window.WORKFLOW_DATA;
|
| 202 |
+
const SPACE_ID = "Leo91fr/minimax-h3-workflows";
|
| 203 |
+
const STATIC_BASE = `https://${SPACE_ID.replace("/", "-").toLowerCase()}.static.hf.space/`;
|
| 204 |
|
| 205 |
function esc(s) {
|
| 206 |
return (s || "").replace(/&/g, "&").replace(/</g, "<")
|
|
|
|
| 229 |
document.getElementById("modal-pre").textContent = "Fetching…";
|
| 230 |
document.getElementById("overlay").classList.add("open");
|
| 231 |
try {
|
| 232 |
+
const r = await fetch(STATIC_BASE + file);
|
| 233 |
if (!r.ok) throw new Error(r.status);
|
| 234 |
const txt = await r.text();
|
| 235 |
const pretty = JSON.stringify(JSON.parse(txt), null, 1);
|
|
|
|
| 308 |
</div>
|
| 309 |
<div class="actions">
|
| 310 |
<button class="btn primary" onclick="openModal('${w.file}')">Preview JSON</button>
|
| 311 |
+
<a class="btn" style="display:inline-flex;align-items:center" href="${STATIC_BASE}${w.file}">↓ Download</a>
|
| 312 |
</div>
|
| 313 |
</div>`;
|
| 314 |
}
|