Xenova HF staff commited on
Commit
422e9a8
1 Parent(s): 4e5e93b

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -45,12 +45,12 @@ fileUpload.addEventListener('change', function (e) {
45
 
46
  // Detect objects in the image
47
  async function detect(url) {
48
- // Read image
49
- const image = await RawImage.fromURL(url);
50
-
51
  // Update UI
52
  imageContainer.innerHTML = '';
53
  imageContainer.style.backgroundImage = `url(${url})`;
 
 
 
54
 
55
  // Set container width and height depending on the image aspect ratio
56
  const ar = image.width / image.height;
 
45
 
46
  // Detect objects in the image
47
  async function detect(url) {
 
 
 
48
  // Update UI
49
  imageContainer.innerHTML = '';
50
  imageContainer.style.backgroundImage = `url(${url})`;
51
+
52
+ // Read image
53
+ const image = await RawImage.fromURL(url);
54
 
55
  // Set container width and height depending on the image aspect ratio
56
  const ar = image.width / image.height;