Spaces:
Runtime error
Runtime error
Commit
·
87f7375
1
Parent(s):
a72476a
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ model = create_ViT()
|
|
18 |
# Load saved weights
|
19 |
model.load_state_dict(
|
20 |
torch.load(
|
21 |
-
f="
|
22 |
map_location=torch.device("cpu"),
|
23 |
)
|
24 |
)
|
@@ -64,7 +64,7 @@ demo = gr.Interface(
|
|
64 |
fn=predict,
|
65 |
inputs=gr.Image(type="pil"),
|
66 |
outputs=[
|
67 |
-
gr.Label(num_top_classes=5, label="Predictions"
|
68 |
gr.Number(label="Prediction time (s)"),
|
69 |
],
|
70 |
examples=example_list,
|
|
|
18 |
# Load saved weights
|
19 |
model.load_state_dict(
|
20 |
torch.load(
|
21 |
+
f="ViT.pth",
|
22 |
map_location=torch.device("cpu"),
|
23 |
)
|
24 |
)
|
|
|
64 |
fn=predict,
|
65 |
inputs=gr.Image(type="pil"),
|
66 |
outputs=[
|
67 |
+
gr.Label(num_top_classes=5, label="Predictions"),
|
68 |
gr.Number(label="Prediction time (s)"),
|
69 |
],
|
70 |
examples=example_list,
|