diff --git a/jarvis/main.py b/jarvis/main.py index d96b3e9..622e914 100644 --- a/jarvis/main.py +++ b/jarvis/main.py @@ -5,6 +5,7 @@ from jarvis.skills.daily.timer import TimerSkill from jarvis.skills.entertainement.decide import DecideSkill from jarvis.skills.entertainement.jokes import JokesSkill from jarvis.skills.entertainement.spotify import SpotifySkill +from jarvis.skills.entertainement.weather import WeatherSkill from jarvis.skills.productivity.speedtest import SpeedTestSkill from jarvis.skills.research.wikipedia import WikipediaSkill from jarvis.utils import languages_utils, flask_utils @@ -21,10 +22,14 @@ if __name__ == '__main__': SpeedTestSkill().register() DecideSkill().register() TimerSkill().register() + WeatherSkill().register() # Load all skills intent_manager.load_all_skills() + # Train Padatious models + intent_manager.train_padatious() + # Bunch of tests # intent_manager.recognise("cherche Elon Musk sur wikipédia") # WORKING # intent_manager.recognise("raconte moi une blague") # WORKING diff --git a/jarvis/skills/intent_manager.py b/jarvis/skills/intent_manager.py index d587375..d79b85e 100644 --- a/jarvis/skills/intent_manager.py +++ b/jarvis/skills/intent_manager.py @@ -83,6 +83,11 @@ def handle(intent_name, data): getattr(skill, handler_method_name)(data=data) +def train_padatious(): + print("Training PADATIOUS intents models, can take a few minutes (first time) or a few seconds (startup)") + padatious_intents_container.train(timeout=120) + + def recognise(sentence, client_ip=None, client_port=None): sentence = sentence.lower() print(sentence)