Spaces:
Build error
Build error
Commit ·
c2e4aba
1
Parent(s): 44dccd8
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,10 +14,10 @@ def image_mod(image):
|
|
| 14 |
|
| 15 |
for r in results:
|
| 16 |
image = r.plot() # plot a BGR numpy array of predictions
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
return
|
| 21 |
|
| 22 |
#Obtener el numero de objetos de cada clase y el nombre
|
| 23 |
|
|
|
|
| 14 |
|
| 15 |
for r in results:
|
| 16 |
image = r.plot() # plot a BGR numpy array of predictions
|
| 17 |
+
image_with_predictions = Image.fromarray(image[..., ::-1]) # RGB PIL image
|
| 18 |
|
| 19 |
+
image_with_predictions = image_with_predictions .resize((ancho, alto))
|
| 20 |
+
return image_with_predictions
|
| 21 |
|
| 22 |
#Obtener el numero de objetos de cada clase y el nombre
|
| 23 |
|