Spaces:
Runtime error
Runtime error
Commit
·
16d81eb
1
Parent(s):
c37b2cf
remove model.to('cpu')
Browse files
app.py
CHANGED
@@ -18,7 +18,6 @@ def predict(img: PIL.Image) -> Tuple[Dict, float]:
|
|
18 |
|
19 |
img = preprocess(img).unsqueeze(dim=0)
|
20 |
|
21 |
-
model.to('cpu')
|
22 |
model.eval()
|
23 |
with torch.inference_mode():
|
24 |
probs = model(img).softmax(dim=-1).squeeze().tolist()
|
|
|
18 |
|
19 |
img = preprocess(img).unsqueeze(dim=0)
|
20 |
|
|
|
21 |
model.eval()
|
22 |
with torch.inference_mode():
|
23 |
probs = model(img).softmax(dim=-1).squeeze().tolist()
|