shreyask commited on
Commit
8acd11e
·
verified ·
1 Parent(s): 73a84a6

Share card links to the Space page

Browse files
Files changed (1) hide show
  1. app.js +2 -1
app.js CHANGED
@@ -74,6 +74,7 @@ var MODELS = {
74
  hard: { name: "Timestral-28M", file: "models/timestral-28m.onnx", bytes: 111840101, backend: "webgpu" }
75
  };
76
  var REFERENCE = calibration_default.randomWalk;
 
77
 
78
  // src/game/sampler.ts
79
  function createSampler(hz = SAMPLE_HZ, lagMs = 50) {
@@ -382,7 +383,7 @@ function canvasToBlob(canvas) {
382
  return new Promise((resolve, reject) => canvas.toBlob((b) => b ? resolve(b) : reject(new Error("couldn't render the card")), "image/png"));
383
  }
384
  function prepareCard(round, p50, model) {
385
- const layout = cardLayout({ caughtPct: round.result().caughtPct, reference: REFERENCE, model, p50Ms: p50, url: location.host + location.pathname });
386
  const canvas = document.createElement("canvas");
387
  canvas.width = layout.width;
388
  canvas.height = layout.height;
 
74
  hard: { name: "Timestral-28M", file: "models/timestral-28m.onnx", bytes: 111840101, backend: "webgpu" }
75
  };
76
  var REFERENCE = calibration_default.randomWalk;
77
+ var SHARE_URL = "hf.co/spaces/shreyask/unpredictable";
78
 
79
  // src/game/sampler.ts
80
  function createSampler(hz = SAMPLE_HZ, lagMs = 50) {
 
383
  return new Promise((resolve, reject) => canvas.toBlob((b) => b ? resolve(b) : reject(new Error("couldn't render the card")), "image/png"));
384
  }
385
  function prepareCard(round, p50, model) {
386
+ const layout = cardLayout({ caughtPct: round.result().caughtPct, reference: REFERENCE, model, p50Ms: p50, url: SHARE_URL });
387
  const canvas = document.createElement("canvas");
388
  canvas.width = layout.width;
389
  canvas.height = layout.height;