version 1.1
Browse files- app.py +1 -1
- predict.py +1 -1
app.py
CHANGED
@@ -9,7 +9,7 @@ demo = gr.Interface(
|
|
9 |
gr.Image(label="Top-1 Class Example"),
|
10 |
gr.Label(label="Top-5 Probabilities")
|
11 |
],
|
12 |
-
title="Scene Classification with Reference Image Testing using Large SWIN version 1.0",
|
13 |
description="Upload an image to get the predicted class with a sample image and top-5 prediction chart."
|
14 |
)
|
15 |
|
|
|
9 |
gr.Image(label="Top-1 Class Example"),
|
10 |
gr.Label(label="Top-5 Probabilities")
|
11 |
],
|
12 |
+
title="Scene Classification with Reference Image Testing using Large SWIN version 1.1.0",
|
13 |
description="Upload an image to get the predicted class with a sample image and top-5 prediction chart."
|
14 |
)
|
15 |
|
predict.py
CHANGED
@@ -36,7 +36,7 @@ class SwinCustom(nn.Module):
|
|
36 |
outputs = self.model(images)
|
37 |
return outputs.logits
|
38 |
|
39 |
-
model_path = hf_hub_download(repo_id="Noha90/AML_16", filename="
|
40 |
print("Model path:", model_path)
|
41 |
model = SwinCustom(model_name=MODEL_NAME, num_classes=40)
|
42 |
state_dict = torch.load(model_path, map_location="cpu")
|
|
|
36 |
outputs = self.model(images)
|
37 |
return outputs.logits
|
38 |
|
39 |
+
model_path = hf_hub_download(repo_id="Noha90/AML_16", filename="large_swin_best_model.pth")
|
40 |
print("Model path:", model_path)
|
41 |
model = SwinCustom(model_name=MODEL_NAME, num_classes=40)
|
42 |
state_dict = torch.load(model_path, map_location="cpu")
|