fix: start processing thread
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user