Spaces:
Paused
Paused
Update static/index.html
Browse files- static/index.html +2 -2
static/index.html
CHANGED
|
@@ -168,7 +168,7 @@
|
|
| 168 |
resultContainer.classList.add('hidden');
|
| 169 |
|
| 170 |
try {
|
| 171 |
-
const response = await fetch('/analyze', {
|
| 172 |
method: 'POST',
|
| 173 |
headers: {
|
| 174 |
'Content-Type': 'application/json',
|
|
@@ -177,7 +177,7 @@
|
|
| 177 |
});
|
| 178 |
|
| 179 |
if (!response.ok) {
|
| 180 |
-
throw new Error(
|
| 181 |
}
|
| 182 |
|
| 183 |
const data = await response.json();
|
|
|
|
| 168 |
resultContainer.classList.add('hidden');
|
| 169 |
|
| 170 |
try {
|
| 171 |
+
const response = await fetch(window.location.origin + '/analyze', {
|
| 172 |
method: 'POST',
|
| 173 |
headers: {
|
| 174 |
'Content-Type': 'application/json',
|
|
|
|
| 177 |
});
|
| 178 |
|
| 179 |
if (!response.ok) {
|
| 180 |
+
throw new Error(Server returned ${response.status});
|
| 181 |
}
|
| 182 |
|
| 183 |
const data = await response.json();
|