lkeab commited on
Commit
84ef148
1 Parent(s): ea9dbee

update app limit

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -37,7 +37,13 @@ predictor = DefaultPredictor(cfg)
37
 
38
 
39
  def inference(image):
40
- #image = image.resize((1024,1024))
 
 
 
 
 
 
41
  img = np.asarray(image)
42
 
43
  #img = np.array(image)
 
37
 
38
 
39
  def inference(image):
40
+ width, height = image.size
41
+ if width > 1300:
42
+ ratio = float(height) / float(width)
43
+ width = 1300
44
+ height = int(ratio * width)
45
+ image = image.resize((width, height))
46
+
47
  img = np.asarray(image)
48
 
49
  #img = np.array(image)