Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def change_photo_state():
|
|
21 |
def load_image(img):
|
22 |
im = Image.open(img)
|
23 |
return im
|
24 |
-
uploaded_photo =
|
25 |
camera_photo = c2.camera_input("Take a photo", on_change=change_photo_state)
|
26 |
|
27 |
#st.subheader("Detection")
|
@@ -47,7 +47,8 @@ if st.checkbox("Generate_Caption"):
|
|
47 |
elif camera_photo:
|
48 |
our_image= load_image(camera_photo)
|
49 |
elif uploaded_photo==None and camera_photo==None:
|
50 |
-
|
|
|
51 |
st.success(predict_step(our_image))
|
52 |
elif st.checkbox("About"):
|
53 |
st.subheader("About Image Captioning App")
|
|
|
21 |
def load_image(img):
|
22 |
im = Image.open(img)
|
23 |
return im
|
24 |
+
uploaded_photo = c3.file_uploader("Upload Image",type=['jpg','png','jpeg'], on_change=change_photo_state)
|
25 |
camera_photo = c2.camera_input("Take a photo", on_change=change_photo_state)
|
26 |
|
27 |
#st.subheader("Detection")
|
|
|
47 |
elif camera_photo:
|
48 |
our_image= load_image(camera_photo)
|
49 |
elif uploaded_photo==None and camera_photo==None:
|
50 |
+
pass
|
51 |
+
#our_image= load_image('image.jpg')
|
52 |
st.success(predict_step(our_image))
|
53 |
elif st.checkbox("About"):
|
54 |
st.subheader("About Image Captioning App")
|