Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -178,9 +178,9 @@ def display_pet_card(pet, is_favorite=False):
|
|
| 178 |
|
| 179 |
with col1:
|
| 180 |
if pet['photos'] and len(pet['photos']) > 0:
|
| 181 |
-
st.image(pet['photos'][0]['medium'],
|
| 182 |
else:
|
| 183 |
-
st.image("https://via.placeholder.com/300x300?text=No+Image",
|
| 184 |
|
| 185 |
with col2:
|
| 186 |
st.markdown(f"<div class='pet-name'>{pet['name']}</div>", unsafe_allow_html=True)
|
|
@@ -305,9 +305,9 @@ def display_pet_details(pet_id):
|
|
| 305 |
photo_cols = st.columns(min(3, len(pet['photos'])))
|
| 306 |
for i, col in enumerate(photo_cols):
|
| 307 |
if i < len(pet['photos']):
|
| 308 |
-
col.image(pet['photos'][i]['large'],
|
| 309 |
else:
|
| 310 |
-
st.image("https://via.placeholder.com/500x300?text=No+Image",
|
| 311 |
|
| 312 |
# Pet details
|
| 313 |
col1, col2 = st.columns(2)
|
|
|
|
| 178 |
|
| 179 |
with col1:
|
| 180 |
if pet['photos'] and len(pet['photos']) > 0:
|
| 181 |
+
st.image(pet['photos'][0]['medium'], use_container_width=True)
|
| 182 |
else:
|
| 183 |
+
st.image("https://via.placeholder.com/300x300?text=No+Image", use_container_width=True)
|
| 184 |
|
| 185 |
with col2:
|
| 186 |
st.markdown(f"<div class='pet-name'>{pet['name']}</div>", unsafe_allow_html=True)
|
|
|
|
| 305 |
photo_cols = st.columns(min(3, len(pet['photos'])))
|
| 306 |
for i, col in enumerate(photo_cols):
|
| 307 |
if i < len(pet['photos']):
|
| 308 |
+
col.image(pet['photos'][i]['large'], use_container_width=True)
|
| 309 |
else:
|
| 310 |
+
st.image("https://via.placeholder.com/500x300?text=No+Image", use_container_width=True)
|
| 311 |
|
| 312 |
# Pet details
|
| 313 |
col1, col2 = st.columns(2)
|