Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,7 @@ from PIL import Image
|
|
6 |
|
7 |
#subprocess.run(["mv","content/custom_data.yaml","./yolov5/data"])
|
8 |
|
9 |
-
|
10 |
-
for root, dirs, files in os.walk(path):
|
11 |
-
if name in files:
|
12 |
-
return os.path.join(root, name)
|
13 |
|
14 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='Content/best.pt')
|
15 |
model.conf = 0.38
|
@@ -23,7 +20,7 @@ def detect(inp):
|
|
23 |
return Image.fromarray(results.imgs[0])
|
24 |
|
25 |
|
26 |
-
inp = gr.inputs.Image(type='
|
27 |
output = gr.outputs.Image(type="pil", label="Output Image")
|
28 |
|
29 |
|
|
|
6 |
|
7 |
#subprocess.run(["mv","content/custom_data.yaml","./yolov5/data"])
|
8 |
|
9 |
+
|
|
|
|
|
|
|
10 |
|
11 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='Content/best.pt')
|
12 |
model.conf = 0.38
|
|
|
20 |
return Image.fromarray(results.imgs[0])
|
21 |
|
22 |
|
23 |
+
inp = gr.inputs.Image(type='file', label="Original Image")
|
24 |
output = gr.outputs.Image(type="pil", label="Output Image")
|
25 |
|
26 |
|