Spaces:
Runtime error
Runtime error
Commit
·
f970b64
1
Parent(s):
b5a5645
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from torch import nn
|
|
4 |
from torchvision import transforms
|
5 |
from PIL import Image
|
6 |
import os
|
7 |
-
os.system(wget https://huggingface.co/antonovmaxim/aiornot-kodIIm-14/resolve/main/model.pth -O model.pth)
|
8 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
9 |
model = torch.hub.load("pytorch/vision", "resnet101", pretrained=False)
|
10 |
model.fc = nn.Sequential(nn.Linear(2048, 500), nn.ReLU(), nn.Linear(500, 2), nn.Softmax(1))
|
|
|
4 |
from torchvision import transforms
|
5 |
from PIL import Image
|
6 |
import os
|
7 |
+
os.system("wget https://huggingface.co/antonovmaxim/aiornot-kodIIm-14/resolve/main/model.pth -O model.pth")
|
8 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
9 |
model = torch.hub.load("pytorch/vision", "resnet101", pretrained=False)
|
10 |
model.fc = nn.Sequential(nn.Linear(2048, 500), nn.ReLU(), nn.Linear(500, 2), nn.Softmax(1))
|