Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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 |
-
|
36 |
-
|
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 |
|