Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ st.write("Welcome to a demo app showcasting basic streamlit component")
|
|
| 25 |
|
| 26 |
# file upload
|
| 27 |
uploaded_image = st.file_uploader("Upload an image", type=['jpg','jpeg','png'])
|
| 28 |
-
uploaded_audio = 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..."):
|
|
@@ -33,15 +33,15 @@ if uploaded_image is not None:
|
|
| 33 |
image = Image.open(uploaded_image)
|
| 34 |
caption = generate_image_caption(image)
|
| 35 |
print(caption)
|
| 36 |
-
st.image(image, caption='Uploaded Image', use_column_width=True)
|
| 37 |
|
| 38 |
-
#Play audio with apinner:
|
| 39 |
-
if uploaded_audio is not None:
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
# Button interaction:
|
| 45 |
-
if st.button("Click Me"):
|
| 46 |
-
|
| 47 |
|
|
|
|
| 25 |
|
| 26 |
# file upload
|
| 27 |
uploaded_image = st.file_uploader("Upload an image", type=['jpg','jpeg','png'])
|
| 28 |
+
# uploaded_audio = 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..."):
|
|
|
|
| 33 |
image = Image.open(uploaded_image)
|
| 34 |
caption = generate_image_caption(image)
|
| 35 |
print(caption)
|
| 36 |
+
# st.image(image, caption='Uploaded Image', use_column_width=True)
|
| 37 |
|
| 38 |
+
# #Play audio with apinner:
|
| 39 |
+
# if uploaded_audio is not None:
|
| 40 |
+
# with st.spinner("Loading audio..."):
|
| 41 |
+
# time.sleep(1)
|
| 42 |
+
# st.audo(uploaded_audio)
|
| 43 |
|
| 44 |
+
# # Button interaction:
|
| 45 |
+
# if st.button("Click Me"):
|
| 46 |
+
# st.write("you clicked the button!")
|
| 47 |
|