Update app.py
Browse files
app.py
CHANGED
|
@@ -28,11 +28,19 @@ uploaded_image = st.file_uploader("Upload an image", type=['jpg','jpeg','png'])
|
|
| 28 |
# uploaded_model = st.file_uploader("Upload an audio file", type = ['mp3','mov','egg'])
|
| 29 |
|
| 30 |
if uploaded_image is not None:
|
| 31 |
-
with st.spinner("
|
| 32 |
time.sleep(1) # Simulate a delay
|
| 33 |
image = image.open(uploaded_image)
|
| 34 |
caption = generate_image_caption(image)
|
| 35 |
st.image(image, caption='Uploaded Image', use_column_width=True)
|
| 36 |
|
| 37 |
#Play audio with apinner:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
|
|
|
| 28 |
# uploaded_model = st.file_uploader("Upload an audio file", type = ['mp3','mov','egg'])
|
| 29 |
|
| 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 |
caption = generate_image_caption(image)
|
| 35 |
st.image(image, caption='Uploaded Image', use_column_width=True)
|
| 36 |
|
| 37 |
#Play audio with apinner:
|
| 38 |
+
if uploaded_audio is not None:
|
| 39 |
+
with st.spinner("Loading audio..."):
|
| 40 |
+
time.sleep(1)
|
| 41 |
+
st.audo(uploaded_audio)
|
| 42 |
+
|
| 43 |
+
# Button interaction:
|
| 44 |
+
if st.button("Click Me"):
|
| 45 |
+
st.write("you clicked the button!")
|
| 46 |
|