Skip to content

Commit eb623d0

Browse files
authored
Update README.md
1 parent 1c65b92 commit eb623d0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ const predictions = await model.detect(img)
3131
## Usage via Script Tag
3232
No npm install required. Just import via the script tag.
3333
```html
34-
<script src="https://cdn.jsdelivr.net/npm/@cloud-annotation/object-detection"> </script>
34+
<script src="https://cdn.jsdelivr.net/npm/@cloud-annotation/object-detection"></script>
3535
<script>
36-
const img = document.getElementById('img')
37-
const model = await objectDetector.load('/model_web')
38-
const predictions = await model.detect(img)
36+
const img = document.getElementById('img')
37+
objectDetector.load('/model_web')
38+
.then(model => model.detect(img))
39+
.then(predictions => {
40+
console.log(predictions)
41+
})
3942
</script>
4043
```
4144

0 commit comments

Comments
 (0)