Spaces:
Build error
Build error
Update app.py
Browse filesall behind the if -- yea
app.py
CHANGED
@@ -23,14 +23,15 @@ def get_caption(image_in):
|
|
23 |
|
24 |
return truncated_caption
|
25 |
|
26 |
-
|
27 |
|
28 |
# Display the uploaded image
|
29 |
-
if
|
30 |
# Read the image
|
31 |
-
|
32 |
|
33 |
# Display the image
|
34 |
st.image(image, caption="Uploaded Image", use_column_width=True)
|
|
|
|
|
35 |
|
36 |
-
get_caption(image)
|
|
|
23 |
|
24 |
return truncated_caption
|
25 |
|
26 |
+
image = st.file_uploader("Drag and drop an image here, or click to select one", type=["png", "jpg", "jpeg"])
|
27 |
|
28 |
# Display the uploaded image
|
29 |
+
if image is not None:
|
30 |
# Read the image
|
31 |
+
|
32 |
|
33 |
# Display the image
|
34 |
st.image(image, caption="Uploaded Image", use_column_width=True)
|
35 |
+
get_caption(image)
|
36 |
+
|
37 |
|
|