luca115 commited on
Commit
7b74cf4
·
verified ·
1 Parent(s): 23553ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ MODELS = {
16
  def get_duration(
17
  image, model_selection
18
  ):
19
- height, width, _ = image.shape
20
  megapixel = math.ceil((width * height) / 1_000_000)
21
 
22
  if model_selection in ["4xNomosWebPhotoRealPLKSR", "4xRealESRGAN"]:
 
16
  def get_duration(
17
  image, model_selection
18
  ):
19
+ width, height = image.size
20
  megapixel = math.ceil((width * height) / 1_000_000)
21
 
22
  if model_selection in ["4xNomosWebPhotoRealPLKSR", "4xRealESRGAN"]: