Spaces:
Build error
Build error
Commit ·
7b664db
1
Parent(s): cc34a52
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def predict(img) -> Tuple[Dict, float]:
|
|
| 37 |
|
| 38 |
# Transform the target image and add a batch dimension
|
| 39 |
img = effnetb2_transforms(img).unsqueeze(0)
|
| 40 |
-
pix =
|
| 41 |
|
| 42 |
# Put model into evaluation mode and turn on inference mode
|
| 43 |
effnetb2.eval()
|
|
|
|
| 37 |
|
| 38 |
# Transform the target image and add a batch dimension
|
| 39 |
img = effnetb2_transforms(img).unsqueeze(0)
|
| 40 |
+
pix = np.array(img.getdata()).reshape(img.size[0], img.size[1], 3)
|
| 41 |
|
| 42 |
# Put model into evaluation mode and turn on inference mode
|
| 43 |
effnetb2.eval()
|