Spaces:
Running
on
Zero
Running
on
Zero
Update scoring_calculation_system.py
Browse files
scoring_calculation_system.py
CHANGED
@@ -1661,6 +1661,10 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
|
|
1661 |
# ็ขบไฟๆ็ตๅๆธๅจๅ็็ฏๅๅ
ง
|
1662 |
return max(0.15, min(1.0, final_score))
|
1663 |
|
|
|
|
|
|
|
|
|
1664 |
|
1665 |
def calculate_environmental_fit(breed_info: dict, user_prefs: UserPreferences) -> float:
|
1666 |
"""่จ็ฎๅ็จฎ่็ฐๅข็้ฉๆๆงๅ ๆ"""
|
|
|
1661 |
# ็ขบไฟๆ็ตๅๆธๅจๅ็็ฏๅๅ
ง
|
1662 |
return max(0.15, min(1.0, final_score))
|
1663 |
|
1664 |
+
except Exception as e:
|
1665 |
+
print(f"Error calculating compatibility score: {str(e)}")
|
1666 |
+
return 60.0 # ่ฟๅๆไฝๅๆธไฝ็บ้ป่ชๅผ
|
1667 |
+
|
1668 |
|
1669 |
def calculate_environmental_fit(breed_info: dict, user_prefs: UserPreferences) -> float:
|
1670 |
"""่จ็ฎๅ็จฎ่็ฐๅข็้ฉๆๆงๅ ๆ"""
|