Spaces:
Runtime error
Runtime error
Commit
·
2994578
1
Parent(s):
50c7786
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from sklearn.preprocessing import LabelEncoder
|
|
10 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
# Load the pre-trained model
|
13 |
-
model = torch.load('model.pt')
|
14 |
model.eval()
|
15 |
|
16 |
# Define the image transformation to normalize the image
|
|
|
10 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
# Load the pre-trained model
|
13 |
+
model = torch.load('model.pt', map_location=torch.device('cpu'))
|
14 |
model.eval()
|
15 |
|
16 |
# Define the image transformation to normalize the image
|