fix: start processing thread

This commit is contained in:
2023-12-27 23:48:37 +00:00
parent 2b844a899f
commit 109e06a5d6
6 changed files with 12 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
<img id="img" src="" />
<p id="statusline">submit an image to get started!</p>
<form id="form" action="http://localhost:5000/submit" method="post">
<form id="form" action="http://localhost:8759/submit" method="post">
<input type="file" id="job" name="image" accept="image/png,image/jpeg" /><br>
<button type="submit" id="submit">submit</button>
</form>
@@ -38,11 +38,11 @@
console.log(id);
while (true) {
const resp = await fetch('http://localhost:5000/state/' + id);
const resp = await fetch('http://localhost:8759/state/' + id);
const state = (await resp.json()).state;
statusline.innerHTML = state;
if (state == "READY") {
img.src = 'http://localhost:5000/result/' + id
img.src = 'http://localhost:8759/result/' + id
return;
}
}