This repository has been archived on 2023-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
jarvis-server/jarvis/main.py

42 lines
1.5 KiB
Python
Raw Normal View History

2021-07-29 23:03:01 +02:00
import lingua_franca
2021-07-26 18:23:32 +02:00
from jarvis.skills import intent_manager
2021-08-02 12:04:25 +02:00
from jarvis.skills.daily.timer import TimerSkill
2021-08-01 21:07:03 +02:00
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
2021-08-01 18:26:26 +02:00
from jarvis.skills.productivity.speedtest import SpeedTestSkill
from jarvis.skills.research.wikipedia import WikipediaSkill
2021-08-01 18:26:26 +02:00
from jarvis.utils import languages_utils, flask_utils
2021-07-26 18:23:32 +02:00
if __name__ == '__main__':
2021-07-29 23:03:01 +02:00
# Load lingua franca in the memory
# Supported : English French German Hungarian Italian Portuguese Swedish
lingua_franca.load_language(lang=languages_utils.get_language_only_country())
2021-07-29 23:03:01 +02:00
# Tests
WikipediaSkill().register()
JokesSkill().register()
SpotifySkill().register()
2021-08-01 18:26:26 +02:00
SpeedTestSkill().register()
2021-08-01 21:07:03 +02:00
DecideSkill().register()
2021-08-02 12:04:25 +02:00
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
# intent_manager.recognise("joue le morceau crazy crazy nights de KISS sur spotify") # WORKING
# intent_manager.recognise("coupe la musique") # WORKING
# intent_manager.recognise("c'est quoi le nom de cette chanson ?") # WORKING
# Start the flask server
flask_utils.start_server()