Spaces:
Sleeping
Sleeping
Changed main app
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ classes = ('plane', 'car', 'bird', 'cat', 'deer',
|
|
14 |
'dog', 'frog', 'horse', 'ship', 'truck')
|
15 |
targets = None
|
16 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
17 |
model.to(device)
|
18 |
|
19 |
# Define the input and output components of the Gradio app
|
|
|
14 |
'dog', 'frog', 'horse', 'ship', 'truck')
|
15 |
targets = None
|
16 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
17 |
+
model.load_state_dict(torch.load("best_nodel.pth",map_location=torch.device("cpu")),strict=False)
|
18 |
model.to(device)
|
19 |
|
20 |
# Define the input and output components of the Gradio app
|