Xenova HF staff commited on
Commit
a4b10d7
1 Parent(s): 50f09f5

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
index.js CHANGED
@@ -54,7 +54,7 @@ async function detect(url) {
54
 
55
  // Set container width and height depending on the image aspect ratio
56
  const ar = image.width / image.height;
57
- const [cw, ch] = (ar > 720 / 480) ? [720, 720 / ar] : [480 * ar, 480];
58
  imageContainer.style.width = `${cw}px`;
59
  imageContainer.style.height = `${ch}px`;
60
 
 
54
 
55
  // Set container width and height depending on the image aspect ratio
56
  const ar = image.width / image.height;
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