Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -81,6 +81,8 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
81 |
model = model.cpu()
|
82 |
model.eval()
|
83 |
|
|
|
|
|
84 |
import torchvision.transforms as transforms
|
85 |
def transform_image(image):
|
86 |
my_transforms = transforms.Compose([transforms.ToTensor(),
|
|
|
81 |
model = model.cpu()
|
82 |
model.eval()
|
83 |
|
84 |
+
model.to(device)
|
85 |
+
|
86 |
import torchvision.transforms as transforms
|
87 |
def transform_image(image):
|
88 |
my_transforms = transforms.Compose([transforms.ToTensor(),
|