Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ st.subheader(':green[_Image Alt Text Generator_]')
|
|
| 20 |
# Retrieve the OpenAI API Key from secrets
|
| 21 |
openai.api_key = st.secrets["openai_api_key"]
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
|
| 26 |
# if uploaded_file:
|
| 27 |
# # Display the uploaded image with specified width
|
|
@@ -135,10 +135,6 @@ else:
|
|
| 135 |
if not uploaded_file and analyze_button:
|
| 136 |
st.warning("Please upload an image.")
|
| 137 |
|
| 138 |
-
|
| 139 |
-
# File uploader allows user to add their own image
|
| 140 |
-
uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
| 141 |
-
|
| 142 |
if uploaded_file:
|
| 143 |
# Display the uploaded image with specified width
|
| 144 |
image_width = 150 # Set the desired width in pixels
|
|
|
|
| 20 |
# Retrieve the OpenAI API Key from secrets
|
| 21 |
openai.api_key = st.secrets["openai_api_key"]
|
| 22 |
|
| 23 |
+
# File uploader allows user to add their own image
|
| 24 |
+
uploaded_file = st.file_uploader("Upload an image", type=["jpg", "png", "jpeg"])
|
| 25 |
|
| 26 |
# if uploaded_file:
|
| 27 |
# # Display the uploaded image with specified width
|
|
|
|
| 135 |
if not uploaded_file and analyze_button:
|
| 136 |
st.warning("Please upload an image.")
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
if uploaded_file:
|
| 139 |
# Display the uploaded image with specified width
|
| 140 |
image_width = 150 # Set the desired width in pixels
|