Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from torchvision.transforms import ToTensor
|
|
| 4 |
from PIL import Image
|
| 5 |
|
| 6 |
# Load your PyTorch model
|
| 7 |
-
model = torch.load("model.pth")
|
| 8 |
|
| 9 |
# Define the function for image classification
|
| 10 |
def classify_image(image):
|
|
|
|
| 4 |
from PIL import Image
|
| 5 |
|
| 6 |
# Load your PyTorch model
|
| 7 |
+
model = torch.load("model.pth",map_location=torch.device('cpu'))
|
| 8 |
|
| 9 |
# Define the function for image classification
|
| 10 |
def classify_image(image):
|