silveroxides
commited on
Commit
•
9bea857
1
Parent(s):
c3498ce
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
11 |
model_file = 'model.pth'
|
12 |
|
13 |
if torch.cuda.is_available():
|
14 |
-
model = torch.load(model_file, map_location=torch.device(
|
15 |
model = model.eval()
|
16 |
|
17 |
transform = transforms.Compose([
|
|
|
11 |
model_file = 'model.pth'
|
12 |
|
13 |
if torch.cuda.is_available():
|
14 |
+
model = torch.load(model_file, map_location=torch.device(device))
|
15 |
model = model.eval()
|
16 |
|
17 |
transform = transforms.Compose([
|