healthai-workout
Service de recommandation d'activité physique personnalisée.
- Image :
ghcr.io/healthai-corpo/healthai-workout - Port :
8002 - Swagger :
http://localhost:8002/docs
Rôle
Génère un programme d'entraînement hebdomadaire personnalisé selon le profil utilisateur (objectif, niveau, équipements disponibles) via un modèle Scikit-learn.
Stack IA
| Composant | Technologie |
|---|---|
| Modèle | Scikit-learn (.joblib) |
| Base NoSQL | MongoDB via Motor (async) |
| Base relationnelle | PostgreSQL — table exercice (lecture) |
Flux principal
POST /recommend/workout
(objectif, niveau, équipements)
→ feature vector
→ modèle Scikit-learn
→ programme hebdomadaire
→ stockage MongoDB
→ JSONStructure MongoDB
json
{
"utilisateur_id": "uuid",
"objectif": "perte_poids",
"niveau": "intermediaire",
"programme": {
"semaine": 1,
"seances": [
{ "jour": "lundi", "exercices": ["..."] }
]
},
"metrics": {
"model_version": "1.0.0",
"confidence_score": 0.87
}
}Structure
src/
├── api/ # Endpoint POST /recommend/workout
├── core/ # Config (chemin modèle .joblib)
├── infrastructure/ # Connexion MongoDB (historique NoSQL)
├── services/ # Logique IA (Scikit-learn fine-tuning)
└── main.py # Serveur (port 8002)
models/ # Modèles entraînés (.joblib)Lancement isolé
bash
cd healthai-workout
uv sync
docker compose up --build healthai-workoutMigrations BDD à prévoir
| Fichier | Contenu |
|---|---|
000006_analyse_repas.up.sql | Cache + historique analyses photos |
000007_historique_recommandations.up.sql | Trace recommandations (ref ObjectId MongoDB) |