Upload index.html with huggingface_hub
Browse files- index.html +17 -9
index.html
CHANGED
|
@@ -281,6 +281,14 @@
|
|
| 281 |
margin: { l: 55, r: 25, t: 45, b: 50 },
|
| 282 |
legend: { bgcolor: "rgba(255,255,255,0.92)", bordercolor: "#ddd", borderwidth: 1 }
|
| 283 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
|
| 285 |
let DATA = null;
|
| 286 |
let state = {
|
|
@@ -373,7 +381,7 @@
|
|
| 373 |
: { color: "#0B6E4F" },
|
| 374 |
hovertemplate: `%{y}<br>${xKey}: %{x:.2f}<extra></extra>`
|
| 375 |
};
|
| 376 |
-
Plotly.newPlot(div, [trace], { ...LAYOUT, title, height: 430 },
|
| 377 |
}
|
| 378 |
|
| 379 |
function plotScatter(div, rows, x, y, color, size, title) {
|
|
@@ -402,7 +410,7 @@
|
|
| 402 |
height: 430,
|
| 403 |
xaxis: { title: x.replaceAll("_", " ") },
|
| 404 |
yaxis: { title: y.replaceAll("_", " ") }
|
| 405 |
-
},
|
| 406 |
}
|
| 407 |
|
| 408 |
function plotRadar(div, rows) {
|
|
@@ -435,7 +443,7 @@
|
|
| 435 |
radialaxis: { visible: true, range: [0, 100], gridcolor: "#e5e7eb" },
|
| 436 |
angularaxis: { gridcolor: "#e5e7eb" }
|
| 437 |
}
|
| 438 |
-
},
|
| 439 |
}
|
| 440 |
|
| 441 |
function plotHeatmap(div) {
|
|
@@ -452,7 +460,7 @@
|
|
| 452 |
colorscale: [[0, "#F1FAEE"], [0.5, "#1B4965"], [1, "#0B6E4F"]],
|
| 453 |
hoverongaps: false,
|
| 454 |
colorbar: { title: "Crash Score" }
|
| 455 |
-
}], { ...LAYOUT, title: "Avg Crash Score by Scenario × Family", height: 520 },
|
| 456 |
}
|
| 457 |
|
| 458 |
function plotGauge(div, value, title, color) {
|
|
@@ -473,7 +481,7 @@
|
|
| 473 |
{ range: [70, 100], color: "#dcfce7" }
|
| 474 |
]
|
| 475 |
}
|
| 476 |
-
}], { height: 220, margin: { t: 40, b: 10, l: 20, r: 20 }, paper_bgcolor: "#fff", font: { color: "#1a1a1a" } },
|
| 477 |
}
|
| 478 |
|
| 479 |
function plotCurves(div, ids) {
|
|
@@ -498,7 +506,7 @@
|
|
| 498 |
height: 440,
|
| 499 |
xaxis: { title: "True Strain" },
|
| 500 |
yaxis: { title: "True Stress (MPa)" }
|
| 501 |
-
},
|
| 502 |
}
|
| 503 |
|
| 504 |
function plotValidation(divParity, divHist) {
|
|
@@ -515,14 +523,14 @@
|
|
| 515 |
x: [0, 100], y: [0, 100],
|
| 516 |
line: { color: "#C44536", dash: "dash", width: 2 }
|
| 517 |
}
|
| 518 |
-
], { ...LAYOUT, title: "AI Prediction vs CAE Validation", height: 420, xaxis: { title: "CAE Crash Score" }, yaxis: { title: "AI Crash Score" } },
|
| 519 |
|
| 520 |
const pass = rows.filter(r => r.pass_fail === "Pass").map(r => r.ai_cae_error_pct);
|
| 521 |
const review = rows.filter(r => r.pass_fail !== "Pass").map(r => r.ai_cae_error_pct);
|
| 522 |
Plotly.newPlot(divHist, [
|
| 523 |
{ type: "histogram", x: pass, name: "Pass", marker: { color: "#0B6E4F" }, opacity: 0.85 },
|
| 524 |
{ type: "histogram", x: review, name: "Review", marker: { color: "#C44536" }, opacity: 0.85 }
|
| 525 |
-
], { ...LAYOUT, barmode: "overlay", title: "AI–CAE Error Distribution", height: 420, xaxis: { title: "AI–CAE Error (%)" } },
|
| 526 |
}
|
| 527 |
|
| 528 |
function materialCard(mat, solver) {
|
|
@@ -841,7 +849,7 @@
|
|
| 841 |
type: "scatter", mode: "lines+markers",
|
| 842 |
x: card.strains, y: card.stresses,
|
| 843 |
line: { color: "#0B6E4F", width: 3 }, name: "Plastic curve"
|
| 844 |
-
}], { ...LAYOUT, title: "Draft Plastic Curve", height: 380, xaxis: { title: "Plastic Strain" }, yaxis: { title: "Stress (MPa)" } },
|
| 845 |
}
|
| 846 |
document.getElementById("dlCard").onclick = () => {
|
| 847 |
const blob = new Blob([card.text], { type: "text/plain" });
|
|
|
|
| 281 |
margin: { l: 55, r: 25, t: 45, b: 50 },
|
| 282 |
legend: { bgcolor: "rgba(255,255,255,0.92)", bordercolor: "#ddd", borderwidth: 1 }
|
| 283 |
};
|
| 284 |
+
const PLOT_CONFIG = {
|
| 285 |
+
responsive: true,
|
| 286 |
+
displayModeBar: true,
|
| 287 |
+
displaylogo: false,
|
| 288 |
+
scrollZoom: true,
|
| 289 |
+
staticPlot: false,
|
| 290 |
+
modeBarButtonsToRemove: ["lasso2d", "select2d"]
|
| 291 |
+
};
|
| 292 |
|
| 293 |
let DATA = null;
|
| 294 |
let state = {
|
|
|
|
| 381 |
: { color: "#0B6E4F" },
|
| 382 |
hovertemplate: `%{y}<br>${xKey}: %{x:.2f}<extra></extra>`
|
| 383 |
};
|
| 384 |
+
Plotly.newPlot(div, [trace], { ...LAYOUT, title, height: 430 }, PLOT_CONFIG);
|
| 385 |
}
|
| 386 |
|
| 387 |
function plotScatter(div, rows, x, y, color, size, title) {
|
|
|
|
| 410 |
height: 430,
|
| 411 |
xaxis: { title: x.replaceAll("_", " ") },
|
| 412 |
yaxis: { title: y.replaceAll("_", " ") }
|
| 413 |
+
}, PLOT_CONFIG);
|
| 414 |
}
|
| 415 |
|
| 416 |
function plotRadar(div, rows) {
|
|
|
|
| 443 |
radialaxis: { visible: true, range: [0, 100], gridcolor: "#e5e7eb" },
|
| 444 |
angularaxis: { gridcolor: "#e5e7eb" }
|
| 445 |
}
|
| 446 |
+
}, PLOT_CONFIG);
|
| 447 |
}
|
| 448 |
|
| 449 |
function plotHeatmap(div) {
|
|
|
|
| 460 |
colorscale: [[0, "#F1FAEE"], [0.5, "#1B4965"], [1, "#0B6E4F"]],
|
| 461 |
hoverongaps: false,
|
| 462 |
colorbar: { title: "Crash Score" }
|
| 463 |
+
}], { ...LAYOUT, title: "Avg Crash Score by Scenario × Family", height: 520 }, PLOT_CONFIG);
|
| 464 |
}
|
| 465 |
|
| 466 |
function plotGauge(div, value, title, color) {
|
|
|
|
| 481 |
{ range: [70, 100], color: "#dcfce7" }
|
| 482 |
]
|
| 483 |
}
|
| 484 |
+
}], { height: 220, margin: { t: 40, b: 10, l: 20, r: 20 }, paper_bgcolor: "#fff", font: { color: "#1a1a1a" } }, PLOT_CONFIG);
|
| 485 |
}
|
| 486 |
|
| 487 |
function plotCurves(div, ids) {
|
|
|
|
| 506 |
height: 440,
|
| 507 |
xaxis: { title: "True Strain" },
|
| 508 |
yaxis: { title: "True Stress (MPa)" }
|
| 509 |
+
}, PLOT_CONFIG);
|
| 510 |
}
|
| 511 |
|
| 512 |
function plotValidation(divParity, divHist) {
|
|
|
|
| 523 |
x: [0, 100], y: [0, 100],
|
| 524 |
line: { color: "#C44536", dash: "dash", width: 2 }
|
| 525 |
}
|
| 526 |
+
], { ...LAYOUT, title: "AI Prediction vs CAE Validation", height: 420, xaxis: { title: "CAE Crash Score" }, yaxis: { title: "AI Crash Score" } }, PLOT_CONFIG);
|
| 527 |
|
| 528 |
const pass = rows.filter(r => r.pass_fail === "Pass").map(r => r.ai_cae_error_pct);
|
| 529 |
const review = rows.filter(r => r.pass_fail !== "Pass").map(r => r.ai_cae_error_pct);
|
| 530 |
Plotly.newPlot(divHist, [
|
| 531 |
{ type: "histogram", x: pass, name: "Pass", marker: { color: "#0B6E4F" }, opacity: 0.85 },
|
| 532 |
{ type: "histogram", x: review, name: "Review", marker: { color: "#C44536" }, opacity: 0.85 }
|
| 533 |
+
], { ...LAYOUT, barmode: "overlay", title: "AI–CAE Error Distribution", height: 420, xaxis: { title: "AI–CAE Error (%)" } }, PLOT_CONFIG);
|
| 534 |
}
|
| 535 |
|
| 536 |
function materialCard(mat, solver) {
|
|
|
|
| 849 |
type: "scatter", mode: "lines+markers",
|
| 850 |
x: card.strains, y: card.stresses,
|
| 851 |
line: { color: "#0B6E4F", width: 3 }, name: "Plastic curve"
|
| 852 |
+
}], { ...LAYOUT, title: "Draft Plastic Curve", height: 380, xaxis: { title: "Plastic Strain" }, yaxis: { title: "Stress (MPa)" } }, PLOT_CONFIG);
|
| 853 |
}
|
| 854 |
document.getElementById("dlCard").onclick = () => {
|
| 855 |
const blob = new Blob([card.text], { type: "text/plain" });
|