Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,12 +74,12 @@ model.load_state_dict(torch.load('resnet18_model (1).pth', map_location=torch.de
|
|
| 74 |
model.eval()
|
| 75 |
|
| 76 |
# Image upload
|
| 77 |
-
uploaded_img = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
| 78 |
|
| 79 |
if uploaded_img is not None:
|
| 80 |
# Display uploaded image in a smaller size
|
| 81 |
image = Image.open(uploaded_img)
|
| 82 |
-
st.image(image, caption="Uploaded Image", width=200)
|
| 83 |
|
| 84 |
# Image transformations
|
| 85 |
sample_transform = transforms.Compose([
|
|
|
|
| 74 |
model.eval()
|
| 75 |
|
| 76 |
# Image upload
|
| 77 |
+
uploaded_img = st.file_uploader("**Upload an image**", type=["jpg", "jpeg", "png"])
|
| 78 |
|
| 79 |
if uploaded_img is not None:
|
| 80 |
# Display uploaded image in a smaller size
|
| 81 |
image = Image.open(uploaded_img)
|
| 82 |
+
st.image(image, caption="**Uploaded Image**", width=200)
|
| 83 |
|
| 84 |
# Image transformations
|
| 85 |
sample_transform = transforms.Compose([
|