Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ def detect(inp):
|
|
| 24 |
#im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
| 25 |
results = model(inp,size=640) # inference
|
| 26 |
results.render() # updates results.imgs with boxes and labels
|
| 27 |
-
return Image.fromarray(results.
|
| 28 |
|
| 29 |
|
| 30 |
inp = gr.Image(type="pil", label="Original Image")
|
|
|
|
| 24 |
#im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
| 25 |
results = model(inp,size=640) # inference
|
| 26 |
results.render() # updates results.imgs with boxes and labels
|
| 27 |
+
return Image.fromarray(results.ims[0])
|
| 28 |
|
| 29 |
|
| 30 |
inp = gr.Image(type="pil", label="Original Image")
|