Update image-classification.html
Browse files
image-classification.html
CHANGED
|
@@ -134,10 +134,10 @@
|
|
| 134 |
const url = URL.createObjectURL(file);
|
| 135 |
|
| 136 |
const result = await classifier(url);
|
| 137 |
-
if (Promise.resolve(
|
| 138 |
-
console.log("
|
| 139 |
} else {
|
| 140 |
-
console.log("
|
| 141 |
}
|
| 142 |
|
| 143 |
document.getElementById("outputAreaLocal").innerText = JSON.stringify(result, null, 2);
|
|
|
|
| 134 |
const url = URL.createObjectURL(file);
|
| 135 |
|
| 136 |
const result = await classifier(url);
|
| 137 |
+
if (Promise.resolve(result) === result) {
|
| 138 |
+
console.log("result is a Promise object");
|
| 139 |
} else {
|
| 140 |
+
console.log("result is not a Promise object");
|
| 141 |
}
|
| 142 |
|
| 143 |
document.getElementById("outputAreaLocal").innerText = JSON.stringify(result, null, 2);
|