Commit
·
a90761a
1
Parent(s):
4492f83
model update
Browse files- app.py +1 -1
- predict.py +1 -1
app.py
CHANGED
@@ -13,4 +13,4 @@ demo = gr.Interface(
|
|
13 |
description="Upload an image to get the predicted class with a sample image and top-5 prediction chart."
|
14 |
)
|
15 |
|
16 |
-
demo.launch()
|
|
|
13 |
description="Upload an image to get the predicted class with a sample image and top-5 prediction chart."
|
14 |
)
|
15 |
|
16 |
+
demo.launch(share=True, ssr_mode=False)
|
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="
|
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="surateakash/scene_classification_swin_large", 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")
|