Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 =
|
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で保存
|