Szeyu commited on
Commit
c5449c3
·
verified ·
1 Parent(s): 71d57cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,11 +28,11 @@ uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"]
28
 
29
  # Display image with spinner
30
  if uploaded_image is not None:
31
- with st.spinner("Loading image..."):
32
  time.sleep(1) # Simulate a delay
33
  image = Image.open(uploaded_image)
34
  st.image(image, caption="Uploaded Image", use_column_width=True)
35
- caption = generate_image_caption(uploaded_image)
36
- st.write("Generated Caption: {caption}")
37
 
38
 
 
28
 
29
  # Display image with spinner
30
  if uploaded_image is not None:
31
+ with st.spinner("Loading image..."):
32
  time.sleep(1) # Simulate a delay
33
  image = Image.open(uploaded_image)
34
  st.image(image, caption="Uploaded Image", use_column_width=True)
35
+ caption = generate_image_caption(uploaded_image)
36
+ st.write(f"Generated Caption: {caption}")
37
 
38