Spaces:
Paused
Paused
Commit ·
9e436c7
1
Parent(s): 91b60f7
Update app.py
Browse files
app.py
CHANGED
|
@@ -493,8 +493,8 @@ model = torch.load("model.pt")
|
|
| 493 |
def predict(image):
|
| 494 |
"""Generates a prediction for the given image."""
|
| 495 |
# image = FileData(image)
|
| 496 |
-
image = components.Image(image)
|
| 497 |
-
|
| 498 |
|
| 499 |
model.eval()
|
| 500 |
|
|
|
|
| 493 |
def predict(image):
|
| 494 |
"""Generates a prediction for the given image."""
|
| 495 |
# image = FileData(image)
|
| 496 |
+
# image = components.Image(image)
|
| 497 |
+
image = Image.fromarray(np.uint8(image))
|
| 498 |
|
| 499 |
model.eval()
|
| 500 |
|