Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from model import ExampleModel
|
|
7 |
model_path = "animal_7.pth"
|
8 |
labels = ["bird", "cat", "dog", "horse"]
|
9 |
num_classes = len(labels)
|
10 |
-
device = torch.device("cuda:0" if torch.cuda.is_available() else "mps")
|
11 |
|
12 |
|
13 |
# Preprocess
|
|
|
7 |
model_path = "animal_7.pth"
|
8 |
labels = ["bird", "cat", "dog", "horse"]
|
9 |
num_classes = len(labels)
|
10 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu")
|
11 |
|
12 |
|
13 |
# Preprocess
|