Spaces:
Sleeping
Sleeping
Fix: Patch 1.1 - Offline astrology with hardcoded city coordinates
Browse files- defrag_engine.py +26 -27
defrag_engine.py
CHANGED
|
@@ -78,35 +78,34 @@ class DefragDeepCompute:
|
|
| 78 |
minute=minute,
|
| 79 |
|
| 80 |
# PATCH 1.1: Use hardcoded coordinates
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
# Calculate stability score (0-100)
|
| 96 |
-
stability = self._calculate_stability(numerology, astrology, system_status)
|
| 97 |
|
| 98 |
-
#
|
| 99 |
-
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
"
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
-
|
| 109 |
-
return soul_log
|
| 110 |
except Exception as e:
|
| 111 |
return {"error": str(e)}
|
| 112 |
|
|
|
|
| 78 |
minute=minute,
|
| 79 |
|
| 80 |
# PATCH 1.1: Use hardcoded coordinates
|
| 81 |
+
coords = CITY_COORDINATES.get(city, CITY_COORDINATES["Unknown"])
|
| 82 |
+
subject = AstrologicalSubjectFactory.from_birth_data(
|
| 83 |
+
name=name,
|
| 84 |
+
year=year,
|
| 85 |
+
month=month,
|
| 86 |
+
day=day,
|
| 87 |
+
hour=hour,
|
| 88 |
+
minute=minute,
|
| 89 |
+
lng=coords["lng"],
|
| 90 |
+
lat=coords["lat"],
|
| 91 |
+
tz_str=coords["tz"],
|
| 92 |
+
online=False
|
| 93 |
+
)
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
+
# Extract key positions
|
| 96 |
+
return {
|
| 97 |
+
"sun_sign": subject.sun.sign if hasattr(subject, 'sun') else "Unknown",
|
| 98 |
+
"moon_sign": subject.moon.sign if hasattr(subject, 'moon') else "Unknown",
|
| 99 |
+
"rising_sign": subject.first_house.sign if hasattr(subject, 'first_house') else "Unknown",
|
| 100 |
+
"planets": {
|
| 101 |
+
"sun": {"sign": subject.sun.sign, "position": subject.sun.position} if hasattr(subject, 'sun') else {},
|
| 102 |
+
"moon": {"sign": subject.moon.sign, "position": subject.moon.position} if hasattr(subject, 'moon') else {},
|
| 103 |
+
"mercury": {"sign": subject.mercury.sign, "position": subject.mercury.position} if hasattr(subject, 'mercury') else {},
|
| 104 |
+
"venus": {"sign": subject.venus.sign, "position": subject.venus.position} if hasattr(subject, 'venus') else {},
|
| 105 |
+
"mars": {"sign": subject.mars.sign, "position": subject.mars.position} if hasattr(subject, 'mars') else {}
|
| 106 |
+
}
|
| 107 |
}
|
| 108 |
+
|
|
|
|
| 109 |
except Exception as e:
|
| 110 |
return {"error": str(e)}
|
| 111 |
|