Spaces:
Running

MegaPotatoAI commited on
Commit
cbf15cb
路
verified 路
1 Parent(s): b5c623e

3 runs a day when logged in to Hugging Face

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. core.js +3 -3
  3. index.html +1 -1
README.md CHANGED
@@ -39,7 +39,7 @@ The boxes are placed by you. Nothing on the page detects or recognizes faces. Th
39
 
40
  ## Free demo limits
41
 
42
- Enhance your own photos in this Space: **1 free run** without logging in (a new one 30 days after it is used), then **2 runs a day** when you log in
43
  to Hugging Face (per network address; the daily runs over a rolling 24 hours), with the same model and size limits as the product (up to 16 400 px per side). The examples work for
44
  everyone.
45
 
 
39
 
40
  ## Free demo limits
41
 
42
+ Enhance your own photos in this Space: **1 free run** without logging in (a new one 30 days after it is used), then **3 runs a day** when you log in
43
  to Hugging Face (per network address; the daily runs over a rolling 24 hours), with the same model and size limits as the product (up to 16 400 px per side). The examples work for
44
  everyone.
45
 
core.js CHANGED
@@ -765,7 +765,7 @@ export async function thumbnail(file, info, edge = 160) {
765
  */
766
  export function errorCopy(err, demo, t) {
767
  const link = (content, text = "megapotato.app") => `<a href="${demo.site("/tool", content, t.scale)}" target="_blank" rel="noopener">${text}</a>`;
768
- const perDay = `${demo.config?.jobs_per_day ?? 2}${NBSP}${t.runs}`;
769
  const loginHint =
770
  window.self !== window.top
771
  ? `Log in to Hugging Face (top right) for ${perDay} a day.`
@@ -831,7 +831,7 @@ const plural = (n, word) => `${n}${NBSP}${word}${n === 1 ? "" : "s"}`;
831
  export function quotaText(demo) {
832
  const c = demo.config;
833
  if (!c) return null;
834
- const perDay = c.jobs_per_day ?? 2;
835
  if (c.login_required && !c.me?.logged_in) return `Preview only 路 ${plural(perDay, "free run")} a day 路 Log in to Hugging Face (top right) to run`;
836
  const left = c.me?.left ?? 0;
837
  if (demo.anonVisitor()) {
@@ -849,7 +849,7 @@ export function leftText(demo) {
849
  if (demo.anonVisitor()) {
850
  return me.left > 0
851
  ? ` 路 ${plural(me.left, "free run")} left without logging in`
852
- : ` 路 Log in to Hugging Face for ${plural(demo.config.jobs_per_day ?? 2, "free run")} a day`;
853
  }
854
  return ` 路 ${plural(me.left, "run")} left today`;
855
  }
 
765
  */
766
  export function errorCopy(err, demo, t) {
767
  const link = (content, text = "megapotato.app") => `<a href="${demo.site("/tool", content, t.scale)}" target="_blank" rel="noopener">${text}</a>`;
768
+ const perDay = `${demo.config?.jobs_per_day ?? 3}${NBSP}${t.runs}`;
769
  const loginHint =
770
  window.self !== window.top
771
  ? `Log in to Hugging Face (top right) for ${perDay} a day.`
 
831
  export function quotaText(demo) {
832
  const c = demo.config;
833
  if (!c) return null;
834
+ const perDay = c.jobs_per_day ?? 3;
835
  if (c.login_required && !c.me?.logged_in) return `Preview only 路 ${plural(perDay, "free run")} a day 路 Log in to Hugging Face (top right) to run`;
836
  const left = c.me?.left ?? 0;
837
  if (demo.anonVisitor()) {
 
849
  if (demo.anonVisitor()) {
850
  return me.left > 0
851
  ? ` 路 ${plural(me.left, "free run")} left without logging in`
852
+ : ` 路 Log in to Hugging Face for ${plural(demo.config.jobs_per_day ?? 3, "free run")} a day`;
853
  }
854
  return ` 路 ${plural(me.left, "run")} left today`;
855
  }
index.html CHANGED
@@ -60,7 +60,7 @@
60
  <div class="go">
61
  <button id="run" class="primary run" type="button" disabled>Enhance faces</button>
62
  </div>
63
- <p class="quota"><span id="quota">1&nbsp;free run without logging in 路 2 a day when you log in to Hugging Face 路 per network address</span>.</p>
64
  </section>
65
 
66
  <div id="status" class="status" aria-live="polite" hidden></div>
 
60
  <div class="go">
61
  <button id="run" class="primary run" type="button" disabled>Enhance faces</button>
62
  </div>
63
+ <p class="quota"><span id="quota">1&nbsp;free run without logging in 路 3 a day when you log in to Hugging Face 路 per network address</span>.</p>
64
  </section>
65
 
66
  <div id="status" class="status" aria-live="polite" hidden></div>