ryo2 commited on
Commit
a3ff2fc
·
verified ·
1 Parent(s): f63e01e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import os
3
 
4
  import gradio as gr
5
  import yolov5
6
- from PIL import Image
7
  model = yolov5.load('model/dango.pt')
8
 
9
  #てすと
@@ -40,7 +40,7 @@ def inference(gr_input):
40
  x2 = int(x2[0])
41
  y2 = int(y2[0])
42
 
43
- img = Image.open(image)
44
  img_crop = img.crop((x1, y1, x2, y2))
45
  img_name = os.path.basename(image)
46
  # pngで保存
 
3
 
4
  import gradio as gr
5
  import yolov5
6
+ from PIL import Image as im
7
  model = yolov5.load('model/dango.pt')
8
 
9
  #てすと
 
40
  x2 = int(x2[0])
41
  y2 = int(y2[0])
42
 
43
+ img = im.open(gr_input)
44
  img_crop = img.crop((x1, y1, x2, y2))
45
  img_name = os.path.basename(image)
46
  # pngで保存