Spaces:
Runtime error
Runtime error
eternalBlissard
commited on
Update predictor.py
Browse files- predictor.py +1 -0
predictor.py
CHANGED
@@ -18,6 +18,7 @@ def predictionMaker(img):
|
|
18 |
ViTModel.to('cuda')
|
19 |
startTime = timer()
|
20 |
img = VitTransforms(img).unsqueeze(0)
|
|
|
21 |
ViTModel.eval()
|
22 |
with torch.inference_mode():
|
23 |
predProbs = torch.softmax(ViTModel(img),dim=1)
|
|
|
18 |
ViTModel.to('cuda')
|
19 |
startTime = timer()
|
20 |
img = VitTransforms(img).unsqueeze(0)
|
21 |
+
img = img.to('cuda')
|
22 |
ViTModel.eval()
|
23 |
with torch.inference_mode():
|
24 |
predProbs = torch.softmax(ViTModel(img),dim=1)
|