Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	Update scoring_calculation_system.py
Browse files- scoring_calculation_system.py +10 -10
    	
        scoring_calculation_system.py
    CHANGED
    
    | @@ -503,9 +503,9 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences) | |
| 503 | 
             
                                },
         | 
| 504 | 
             
                                "Large": {
         | 
| 505 | 
             
                                    "apartment": {
         | 
| 506 | 
            -
                                        "no_yard": 0. | 
| 507 | 
            -
                                        "shared_yard": 0. | 
| 508 | 
            -
                                        "private_yard": 0. | 
| 509 | 
             
                                    },
         | 
| 510 | 
             
                                    "house_small": {
         | 
| 511 | 
             
                                        "no_yard": 0.55,
         | 
| @@ -520,9 +520,9 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences) | |
| 520 | 
             
                                },
         | 
| 521 | 
             
                                "Giant": {
         | 
| 522 | 
             
                                    "apartment": {
         | 
| 523 | 
            -
                                        "no_yard": 0. | 
| 524 | 
            -
                                        "shared_yard": 0. | 
| 525 | 
            -
                                        "private_yard": 0. | 
| 526 | 
             
                                    },
         | 
| 527 | 
             
                                    "house_small": {
         | 
| 528 | 
             
                                        "no_yard": 0.40,
         | 
| @@ -544,8 +544,8 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences) | |
| 544 | 
             
                            # ιειζ±ε°η©Ίιθ©εηε½±ιΏ
         | 
| 545 | 
             
                            exercise_impact = {
         | 
| 546 | 
             
                                "Very High": {
         | 
| 547 | 
            -
                                    "apartment": -0. | 
| 548 | 
            -
                                    "house_small": -0. | 
| 549 | 
             
                                    "house_large": -0.05
         | 
| 550 | 
             
                                },
         | 
| 551 | 
             
                                "High": {
         | 
| @@ -605,10 +605,10 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences) | |
| 605 | 
             
                        def apply_extreme_case_adjustments(score):
         | 
| 606 | 
             
                            # θηζ₯΅η«―ζ
ζ³
         | 
| 607 | 
             
                            if size == "Giant" and living_space == "apartment":
         | 
| 608 | 
            -
                                return score * 0. | 
| 609 |  | 
| 610 | 
             
                            if size == "Large" and living_space == "apartment" and exercise_needs == "Very High":
         | 
| 611 | 
            -
                                return score * 0. | 
| 612 |  | 
| 613 | 
             
                            if size == "Small" and living_space == "house_large" and exercise_needs == "Low":
         | 
| 614 | 
             
                                return score * 0.9  # δ½ιειζ±ηε°εη¬ε¨ε€§ζΏεε―θ½ιζΌε―¬ζ
         | 
|  | |
| 503 | 
             
                                },
         | 
| 504 | 
             
                                "Large": {
         | 
| 505 | 
             
                                    "apartment": {
         | 
| 506 | 
            +
                                        "no_yard": 0.35,      
         | 
| 507 | 
            +
                                        "shared_yard": 0.45,
         | 
| 508 | 
            +
                                        "private_yard": 0.55
         | 
| 509 | 
             
                                    },
         | 
| 510 | 
             
                                    "house_small": {
         | 
| 511 | 
             
                                        "no_yard": 0.55,
         | 
|  | |
| 520 | 
             
                                },
         | 
| 521 | 
             
                                "Giant": {
         | 
| 522 | 
             
                                    "apartment": {
         | 
| 523 | 
            +
                                        "no_yard": 0.15,      # ε·¨εη¬ε¨ε
¬ε―εΊζ¬δΈι©ε
         | 
| 524 | 
            +
                                        "shared_yard": 0.25,
         | 
| 525 | 
            +
                                        "private_yard": 0.35
         | 
| 526 | 
             
                                    },
         | 
| 527 | 
             
                                    "house_small": {
         | 
| 528 | 
             
                                        "no_yard": 0.40,
         | 
|  | |
| 544 | 
             
                            # ιειζ±ε°η©Ίιθ©εηε½±ιΏ
         | 
| 545 | 
             
                            exercise_impact = {
         | 
| 546 | 
             
                                "Very High": {
         | 
| 547 | 
            +
                                    "apartment": -0.15,    # ι«ιειζ±ε¨ε
¬ε―η°ε’ζ΄ει
         | 
| 548 | 
            +
                                    "house_small": -0.10,
         | 
| 549 | 
             
                                    "house_large": -0.05
         | 
| 550 | 
             
                                },
         | 
| 551 | 
             
                                "High": {
         | 
|  | |
| 605 | 
             
                        def apply_extreme_case_adjustments(score):
         | 
| 606 | 
             
                            # θηζ₯΅η«―ζ
ζ³
         | 
| 607 | 
             
                            if size == "Giant" and living_space == "apartment":
         | 
| 608 | 
            +
                                return score * 0.75  # ε·¨εη¬ε¨ε
¬ε―硦δΊθΌδ½εζΈ
         | 
| 609 |  | 
| 610 | 
             
                            if size == "Large" and living_space == "apartment" and exercise_needs == "Very High":
         | 
| 611 | 
            +
                                return score * 0.85  # ι«ιειζ±ηε€§εη¬ε¨ε
¬ε―ζ΄δΈι©ε
         | 
| 612 |  | 
| 613 | 
             
                            if size == "Small" and living_space == "house_large" and exercise_needs == "Low":
         | 
| 614 | 
             
                                return score * 0.9  # δ½ιειζ±ηε°εη¬ε¨ε€§ζΏεε―θ½ιζΌε―¬ζ
         | 
