Spaces:
Sleeping
Sleeping
Commit ·
96b79f7
1
Parent(s): 635a65e
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,8 +27,10 @@ model = eval(f'{model_type}(weights="imagenet")')
|
|
| 27 |
|
| 28 |
img_path = st.file_uploader("Upload Picture")
|
| 29 |
|
| 30 |
-
|
| 31 |
-
img = Image.open(img_path)
|
|
|
|
|
|
|
| 32 |
st.image(img)
|
| 33 |
|
| 34 |
img = img.resize((224, 224)) # Resize to match VGG16 input size
|
|
|
|
| 27 |
|
| 28 |
img_path = st.file_uploader("Upload Picture")
|
| 29 |
|
| 30 |
+
try:
|
| 31 |
+
img = Image.open(img_path)
|
| 32 |
+
except:
|
| 33 |
+
img = Image.open('dog.jpg')
|
| 34 |
st.image(img)
|
| 35 |
|
| 36 |
img = img.resize((224, 224)) # Resize to match VGG16 input size
|