Spaces:
Running
Running
Ron Au
commited on
Commit
·
ab191ec
1
Parent(s):
372755f
feat(duration): Increase polling interval to 10s and ETA to 490s
Browse files- static/index.js +1 -1
- templates/index.html +1 -1
static/index.js
CHANGED
@@ -139,7 +139,7 @@ const pollTask = async (task) => {
|
|
139 |
return await taskResponse.json();
|
140 |
};
|
141 |
|
142 |
-
const longPollTask = async (task, interval =
|
143 |
if (task.status === 'complete' || (max && task.poll_count > max)) {
|
144 |
return task;
|
145 |
}
|
|
|
139 |
return await taskResponse.json();
|
140 |
};
|
141 |
|
142 |
+
const longPollTask = async (task, interval = 10_000, max) => {
|
143 |
if (task.status === 'complete' || (max && task.poll_count > max)) {
|
144 |
return task;
|
145 |
}
|
templates/index.html
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
</head>
|
16 |
<body>
|
17 |
<h1>This Pokémon Does Not Exist</h1>
|
18 |
-
<div class="duration"><span class="seconds">0.0</span>s (ETA:
|
19 |
<button class="generate">Generate Pokémon Card with AI</button>
|
20 |
<section class="render"></section>
|
21 |
</body>
|
|
|
15 |
</head>
|
16 |
<body>
|
17 |
<h1>This Pokémon Does Not Exist</h1>
|
18 |
+
<div class="duration"><span class="seconds">0.0</span>s (ETA: 490s)</div>
|
19 |
<button class="generate">Generate Pokémon Card with AI</button>
|
20 |
<section class="render"></section>
|
21 |
</body>
|