38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
import sys
|
|
import os
|
|
|
|
# Add src to path
|
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../src")))
|
|
|
|
from garmin.sync import GarminSync
|
|
from garmin.client import GarminClient
|
|
from recommendations.engine import RecommendationEngine
|
|
|
|
def main():
|
|
print("🤖 Gemini Fitness AI")
|
|
|
|
# Try to load local data first
|
|
client = GarminClient()
|
|
if client.login() != "SUCCESS":
|
|
print("Failed to login to Garmin Connect. Proceeding with dummy data.")
|
|
history = []
|
|
else:
|
|
sync = GarminSync(client)
|
|
history = sync.load_local_activities()
|
|
|
|
if not history:
|
|
print("⚠️ No local history found. Running on empty profile.")
|
|
|
|
objective = "trained, strong and endurance"
|
|
engine = RecommendationEngine()
|
|
|
|
print("⏳ Analyzing your data...")
|
|
recommendation = engine.get_recommendation(history, objective)
|
|
|
|
print("\n--- Gemini's Advice ---")
|
|
print(recommendation)
|
|
print("------------------------\n")
|
|
|
|
if __name__ == "__main__":
|
|
main()
|