Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -313,18 +313,29 @@ def display_pet_details(pet_id):
|
|
313 |
col1, col2 = st.columns(2)
|
314 |
|
315 |
with col1:
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
|
329 |
with col2:
|
330 |
st.markdown("### Compatibility")
|
|
|
313 |
col1, col2 = st.columns(2)
|
314 |
|
315 |
with col1:
|
316 |
+
st.markdown("### Details")
|
317 |
+
# Fix the breed line
|
318 |
+
breed_text = pet['breeds']['primary']
|
319 |
+
if pet['breeds']['secondary']:
|
320 |
+
breed_text += f" & {pet['breeds']['secondary']}"
|
321 |
+
if pet['breeds']['mixed']:
|
322 |
+
breed_text += " (Mixed)"
|
323 |
+
|
324 |
+
details = [
|
325 |
+
f"**Type:** {pet['type']}",
|
326 |
+
f"**Breed:** {breed_text}",
|
327 |
+
f"**Age:** {pet['age']}",
|
328 |
+
f"**Gender:** {pet['gender']}",
|
329 |
+
f"**Size:** {pet['size']}"
|
330 |
+
]
|
331 |
+
|
332 |
+
# Fix the colors line as well, to be safe
|
333 |
+
colors = [c for c in [pet['colors']['primary'], pet['colors']['secondary'], pet['colors']['tertiary']] if c]
|
334 |
+
if colors:
|
335 |
+
details.append(f"**Colors:** {', '.join(colors)}")
|
336 |
+
|
337 |
+
for detail in details:
|
338 |
+
st.markdown(detail)
|
339 |
|
340 |
with col2:
|
341 |
st.markdown("### Compatibility")
|