Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ transform_input_image = transforms.Compose([
|
|
| 29 |
|
| 30 |
def load_model_from_huggingface():
|
| 31 |
model_filename = "ckpt_clothing_resnet50.pth"
|
| 32 |
-
model_path = hf_hub_download(repo_id="
|
| 33 |
|
| 34 |
# Load checkpoint and check keys
|
| 35 |
checkpoint = torch.load(model_path, map_location=torch.device("cpu"), weights_only=False)
|
|
@@ -78,7 +78,7 @@ interface = gr.Interface(
|
|
| 78 |
fn=gradio_inference,
|
| 79 |
inputs=gr.Image(type="pil"),
|
| 80 |
outputs="text",
|
| 81 |
-
title="
|
| 82 |
description="Upload an image of clothing and get a predicted class with confidence score.",
|
| 83 |
examples=["images/tshirt.jpg", "images/pants.jpg"]
|
| 84 |
)
|
|
|
|
| 29 |
|
| 30 |
def load_model_from_huggingface():
|
| 31 |
model_filename = "ckpt_clothing_resnet50.pth"
|
| 32 |
+
model_path = hf_hub_download(repo_id="PrachiY/image-classification-model-space", filename=model_filename)
|
| 33 |
|
| 34 |
# Load checkpoint and check keys
|
| 35 |
checkpoint = torch.load(model_path, map_location=torch.device("cpu"), weights_only=False)
|
|
|
|
| 78 |
fn=gradio_inference,
|
| 79 |
inputs=gr.Image(type="pil"),
|
| 80 |
outputs="text",
|
| 81 |
+
title="image-classification-model",
|
| 82 |
description="Upload an image of clothing and get a predicted class with confidence score.",
|
| 83 |
examples=["images/tshirt.jpg", "images/pants.jpg"]
|
| 84 |
)
|