Complete Stats & Narrative Engine + Testing Suite

- Stats: Added K-Means clustering, Tempo Zones, Harmonic Profile.
- Narrative: Optimized for Gemini tokens + JSON robustness.
- Testing: Added comprehensive backend/TESTING.md and standalone test script.
- Setup: Improved get_refresh_token.py for user onboarding.
This commit is contained in:
bnair123
2025-12-25 18:50:38 +04:00
parent af0d985253
commit e7980cc706
4 changed files with 233 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ def run_analysis_pipeline(days: int = 30, model_name: str = "gemini-2.5-flash"):
# 2. Generate Narrative
print(f"Generating Narrative with {model_name}...")
narrative_service = NarrativeService(model_name=model_name)
narrative_json = narrative_service.generate_narrative(stats_json)
narrative_json = narrative_service.generate_full_narrative(stats_json)
if "error" in narrative_json:
print(f"LLM Error: {narrative_json['error']}")