Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,11 +32,17 @@ openai.api_key = st.secrets["openai_api_key"]
|
|
| 32 |
# uploaded_file = st.sidebar.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
| 33 |
uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
if uploaded_file:
|
| 36 |
# Display the uploaded image with specified width
|
| 37 |
image_width = 200 # Set the desired width in pixels
|
| 38 |
with st.expander("Image", expanded=True):
|
| 39 |
-
st.
|
| 40 |
|
| 41 |
# Toggle for showing additional details input
|
| 42 |
show_details = st.toggle("Add details about the image. ", value=False)
|
|
|
|
| 32 |
# uploaded_file = st.sidebar.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
| 33 |
uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
| 34 |
|
| 35 |
+
# if uploaded_file:
|
| 36 |
+
# # Display the uploaded image with specified width
|
| 37 |
+
# image_width = 200 # Set the desired width in pixels
|
| 38 |
+
# with st.expander("Image", expanded=True):
|
| 39 |
+
# st.sidebar.image(uploaded_file, caption=uploaded_file.name, width=image_width, use_column_width=False)
|
| 40 |
+
|
| 41 |
if uploaded_file:
|
| 42 |
# Display the uploaded image with specified width
|
| 43 |
image_width = 200 # Set the desired width in pixels
|
| 44 |
with st.expander("Image", expanded=True):
|
| 45 |
+
st.image(uploaded_file, caption=uploaded_file.name, width=image_width, use_column_width=False)
|
| 46 |
|
| 47 |
# Toggle for showing additional details input
|
| 48 |
show_details = st.toggle("Add details about the image. ", value=False)
|