Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ model = torchvision.models.resnet50(pretrained=False)
|
|
6 |
model.fc = nn.Linear(model.fc.in_features, 2)
|
7 |
model.load_state_dict(torch.load("model.pth", map_location=torch.device('cpu')))
|
8 |
model.eval()
|
|
|
9 |
|
10 |
import gradio as gr
|
11 |
from PIL import Image
|
|
|
6 |
model.fc = nn.Linear(model.fc.in_features, 2)
|
7 |
model.load_state_dict(torch.load("model.pth", map_location=torch.device('cpu')))
|
8 |
model.eval()
|
9 |
+
device = torch.device("cpu")
|
10 |
|
11 |
import gradio as gr
|
12 |
from PIL import Image
|