Xenova HF staff commited on
Commit
b5d1004
1 Parent(s): c69717b

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
index.js CHANGED
@@ -47,7 +47,6 @@ fileUpload.addEventListener('change', function (e) {
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);
@@ -57,6 +56,7 @@ async function detect(url) {
57
  const [cw, ch] = (ar > 1) ? [640, 640 / ar] : [640 * ar, 640];
58
  imageContainer.style.width = `${cw}px`;
59
  imageContainer.style.height = `${ch}px`;
 
60
 
61
  status.textContent = 'Analysing...';
62
 
 
47
  async function detect(url) {
48
  // Update UI
49
  imageContainer.innerHTML = '';
 
50
 
51
  // Read image
52
  const image = await RawImage.fromURL(url);
 
56
  const [cw, ch] = (ar > 1) ? [640, 640 / ar] : [640 * ar, 640];
57
  imageContainer.style.width = `${cw}px`;
58
  imageContainer.style.height = `${ch}px`;
59
+ imageContainer.style.backgroundImage = `url(${url})`;
60
 
61
  status.textContent = 'Analysing...';
62