WebHost: notify of current generation queue length

This commit is contained in:
Fabian Dill
2025-05-11 15:03:04 +02:00
parent 824caaffd0
commit d463faa9d9
2 changed files with 34 additions and 11 deletions

View File

@@ -30,10 +30,21 @@
}
const data = await response.json();
waitSeedDiv.innerHTML = `
<h1>Generation in Progress</h1>
<p>${data.text}</p>
`;
if (data.queue_len === 1){
waitSeedDiv.innerHTML = `
<h1>Generation in Progress</h1>
<p>${data.text}</p>
<p>This is the only generation in the queue.</p>
`;
}
else {
waitSeedDiv.innerHTML = `
<h1>Generation in Progress</h1>
<p>${data.text}</p>
<p>There are ${data.queue_len} generations in the queue.</p>
`;
}
setTimeout(checkStatus, 1000); // Continue polling.
} catch (error) {