Spaces:
Running
on
Zero
Running
on
Zero
Update data_manager.py
Browse files- data_manager.py +19 -9
data_manager.py
CHANGED
@@ -184,16 +184,26 @@ def get_dog_description(breed):
|
|
184 |
# 如果找到資料,返回字典格式的描述信息
|
185 |
if result:
|
186 |
description = {
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
"Description": result[10]
|
196 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
return description
|
198 |
else:
|
199 |
return "Description not available for this breed."
|
|
|
184 |
# 如果找到資料,返回字典格式的描述信息
|
185 |
if result:
|
186 |
description = {
|
187 |
+
'Size': result[2],
|
188 |
+
'Lifespan': result[3],
|
189 |
+
'Temperament': result[4],
|
190 |
+
'Care Level': result[5],
|
191 |
+
'Good with Children': 'Yes' if result[6] else 'No',
|
192 |
+
'Exercise Needs': result[7],
|
193 |
+
'Grooming Needs': result[8],
|
194 |
+
'Description': result[9]
|
|
|
195 |
}
|
196 |
+
# description = {
|
197 |
+
# "Breed": result[2],
|
198 |
+
# "Size": result[3],
|
199 |
+
# "Lifespan": result[4],
|
200 |
+
# "Temperament": result[5],
|
201 |
+
# "Care Level": result[6],
|
202 |
+
# "Good with Children": "Yes" if result[7] else "No",
|
203 |
+
# "Exercise Needs": result[8],
|
204 |
+
# "Grooming Needs": result[9],
|
205 |
+
# "Description": result[10]
|
206 |
+
# }
|
207 |
return description
|
208 |
else:
|
209 |
return "Description not available for this breed."
|