jethrovic commited on
Commit
2ee6475
1 Parent(s): 62eff94

Update app.py

Browse files

all behind the if -- yea

Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -23,14 +23,15 @@ def get_caption(image_in):
23
 
24
  return truncated_caption
25
 
26
- uploaded_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 uploaded_image is not None:
30
  # Read the image
31
- image = image.open(uploaded_image)
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