Spaces:
Sleeping
Sleeping
fix
Browse files- app.py +2 -2
- examples/bird.jpg +0 -0
app.py
CHANGED
@@ -12,7 +12,7 @@ matplotlib.use('agg')
|
|
12 |
from matplotlib import pyplot as plt
|
13 |
|
14 |
resnet_18 = model.LitResnet()
|
15 |
-
state_dict = torch.load("
|
16 |
resnet_18.load_state_dict(state_dict)
|
17 |
resnet_18_model = resnet_18.model
|
18 |
|
@@ -118,7 +118,7 @@ with gr.Blocks() as demo:
|
|
118 |
["examples/cat.jpg", 3, True],
|
119 |
["examples/horse.jpg", 3, True],
|
120 |
["examples/airplane.jpg", 3, True],
|
121 |
-
["examples/
|
122 |
["examples/automobile.jpg", 3, True],
|
123 |
["examples/deer.jpg", 3, True],
|
124 |
["examples/frog.jpg", 3, True],
|
|
|
12 |
from matplotlib import pyplot as plt
|
13 |
|
14 |
resnet_18 = model.LitResnet()
|
15 |
+
state_dict = torch.load("resnet.pth", map_location=torch.device('cpu'))
|
16 |
resnet_18.load_state_dict(state_dict)
|
17 |
resnet_18_model = resnet_18.model
|
18 |
|
|
|
118 |
["examples/cat.jpg", 3, True],
|
119 |
["examples/horse.jpg", 3, True],
|
120 |
["examples/airplane.jpg", 3, True],
|
121 |
+
["examples/bird.jpg", 3, True],
|
122 |
["examples/automobile.jpg", 3, True],
|
123 |
["examples/deer.jpg", 3, True],
|
124 |
["examples/frog.jpg", 3, True],
|
examples/bird.jpg
ADDED
![]() |