Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,14 +26,11 @@ st.write("Image to Story")
|
|
26 |
# File uploader for image and audio
|
27 |
uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
28 |
|
29 |
-
# Display image with spinner
|
30 |
# Display image with spinner
|
31 |
if uploaded_image is not None:
|
32 |
-
with st.spinner("Loading image..."):
|
33 |
time.sleep(1) # Simulate a delay
|
34 |
image = Image.open(uploaded_image)
|
35 |
st.image(image, caption="Uploaded Image", use_column_width=True)
|
36 |
caption = generate_image_caption(uploaded_image)
|
37 |
-
st.write(f"Generated Caption: {caption}")
|
38 |
-
|
39 |
-
|
|
|
26 |
# File uploader for image and audio
|
27 |
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..."): # make sure this line ends with a colon!
|
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}")
|
|
|
|