DawnC commited on
Commit
188b921
1 Parent(s): e7a05a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -0
app.py CHANGED
@@ -1063,6 +1063,35 @@ def format_description_html(description, breed):
1063
  </span> {value}
1064
  </li>
1065
  '''
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
  else:
1067
  # 其他欄位保持原樣顯示
1068
  html += f"<li style='margin-bottom: 10px;'><strong>{key}:</strong> {value}</li>"
 
1063
  </span> {value}
1064
  </li>
1065
  '''
1066
+ elif key == "Lifespan":
1067
+ html += f'''
1068
+ <li style='margin-bottom: 10px;'>
1069
+ <span class="tooltip">
1070
+ <strong>{key}:</strong>
1071
+ <span class="tooltip-icon">ⓘ</span>
1072
+ <span class="tooltip-text">
1073
+ <strong>Average Lifespan:</strong><br>
1074
+ • Short: 6-8 years<br>
1075
+ • Average: 10-15 years<br>
1076
+ • Long: 12-20 years
1077
+ </span>
1078
+ </span> {value}
1079
+ </li>
1080
+ '''
1081
+ elif key == "TEMPERAMENT & PERSONALITY":
1082
+ html += f'''
1083
+ <li style='margin-bottom: 10px;'>
1084
+ <span class="tooltip">
1085
+ <strong>{key}:</strong>
1086
+ <span class="tooltip-icon">ⓘ</span>
1087
+ <span class="tooltip-text">
1088
+ <strong>Temperament Guide:</strong><br>
1089
+ • Describes the dog's natural behavior<br>
1090
+ • Important for matching with owner
1091
+ </span>
1092
+ </span> {value}
1093
+ </li>
1094
+ '''
1095
  else:
1096
  # 其他欄位保持原樣顯示
1097
  html += f"<li style='margin-bottom: 10px;'><strong>{key}:</strong> {value}</li>"