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