Registered WeatherSkill and train_padatious on startup
This commit is contained in:
parent
a9c70c6009
commit
f6ee8ed1b1
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user