diff --git a/python_ml/main.py b/python_ml/main.py index 31b9eac..2254655 100644 --- a/python_ml/main.py +++ b/python_ml/main.py @@ -680,7 +680,16 @@ if __name__ == "__main__": import uvicorn # Prova a caricare modello esistente - ml_analyzer.load_model() + if USE_HYBRID_DETECTOR: + # Hybrid detector: già caricato all'inizializzazione (riga 69) + if ml_detector and ml_detector.is_trained: + print("[ML] ✓ Hybrid detector models loaded and ready") + else: + print("[ML] ⚠ Hybrid detector initialized but no models found (will train on-demand)") + else: + # Legacy analyzer + if ml_analyzer: + ml_analyzer.load_model() print("🚀 Starting IDS API on http://0.0.0.0:8000") print("📚 Docs available at http://0.0.0.0:8000/docs")