Spaces:
Sleeping
Sleeping
deploy rater (Docker/FastAPI): registration + completeness gate + /api/submit → dataset
Browse files- static/index.html +10 -12
static/index.html
CHANGED
|
@@ -985,14 +985,15 @@ function genRaterId() {
|
|
| 985 |
* Shuffling (anonymization)
|
| 986 |
* ========================================================================= */
|
| 987 |
function buildShuffle(cases) {
|
| 988 |
-
// Deterministic per (rater, case)
|
| 989 |
-
//
|
| 990 |
-
//
|
| 991 |
-
//
|
| 992 |
-
//
|
| 993 |
-
//
|
|
|
|
|
|
|
| 994 |
for (const c of cases) {
|
| 995 |
-
if (SHUFFLE[c.id] && SHUFFLE[c.id].length === c.videos.length) continue;
|
| 996 |
const indices = c.videos.map((_, i) => i);
|
| 997 |
let s = hashStr(RATER.id + ":" + c.id);
|
| 998 |
for (let k = 0; k < 6; k++) s = (s * 1664525 + 1013904223) >>> 0;
|
|
@@ -1348,12 +1349,9 @@ function renderShell() {
|
|
| 1348 |
}
|
| 1349 |
|
| 1350 |
function renderHeader() {
|
|
|
|
|
|
|
| 1351 |
return el("header", { class: "top" },
|
| 1352 |
-
el("div", {},
|
| 1353 |
-
el("div", { class: "title" }, t("title")),
|
| 1354 |
-
el("div", { class: "subtitle" },
|
| 1355 |
-
t("subtitle", CASES.length, TOTAL_QUESTIONS)),
|
| 1356 |
-
),
|
| 1357 |
el("div", { class: "progress" },
|
| 1358 |
el("div", { class: "progress-bar" },
|
| 1359 |
el("div", { class: "progress-fill", id: "progressFill" })),
|
|
|
|
| 985 |
* Shuffling (anonymization)
|
| 986 |
* ========================================================================= */
|
| 987 |
function buildShuffle(cases) {
|
| 988 |
+
// Deterministic per (rater, case) and ALWAYS recomputed on load. The
|
| 989 |
+
// recomputation is idempotent (same seed → same order), so it costs nothing
|
| 990 |
+
// for raters whose cached SHUFFLE already matches; it also forces a refresh
|
| 991 |
+
// of any stale per-case order saved by older code paths (e.g. when the
|
| 992 |
+
// admin reveal toggle used to short-circuit the shuffle and lock ours into
|
| 993 |
+
// slot A). The shuffle is independent of the reveal toggle now — the
|
| 994 |
+
// toggle only controls whether the model name is rendered next to the
|
| 995 |
+
// slot letter.
|
| 996 |
for (const c of cases) {
|
|
|
|
| 997 |
const indices = c.videos.map((_, i) => i);
|
| 998 |
let s = hashStr(RATER.id + ":" + c.id);
|
| 999 |
for (let k = 0; k < 6; k++) s = (s * 1664525 + 1013904223) >>> 0;
|
|
|
|
| 1349 |
}
|
| 1350 |
|
| 1351 |
function renderHeader() {
|
| 1352 |
+
// Title + subtitle removed per request — only the progress bar remains in
|
| 1353 |
+
// the top strip. The header keeps `class="top"` for spacing / borders.
|
| 1354 |
return el("header", { class: "top" },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1355 |
el("div", { class: "progress" },
|
| 1356 |
el("div", { class: "progress-bar" },
|
| 1357 |
el("div", { class: "progress-fill", id: "progressFill" })),
|