Add fuzzy and text-classification light model #1

Merged
Tjiho merged 18 commits from fuzzy into master 2025-02-01 01:35:11 +01:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 1eba121bec - Show all commits

View file

@ -44,12 +44,13 @@ class Mpd():
if (list_album): if (list_album):
random_album = random.choice(list_album)["directory"] random_album = random.choice(list_album)["directory"]
self.play_album(random_album) self.play_album(random_album)
return "C'est parti !" res = "C'est parti !"
else: else:
return "Je n\'ai rien trouvé." res = "Je n\'ai rien trouvé."
self.client.close() self.client.close()
self.client.disconnect() self.client.disconnect()
return res
def play_album(self, directory): def play_album(self, directory):
self.client.stop() self.client.stop()

View file

@ -69,7 +69,8 @@ class Ratatouille():
elif command == "LightOff": elif command == "LightOff":
return self.light_off_single(payload['intentArg'][0]) return self.light_off_single(payload['intentArg'][0])
elif command == "PlayMusicGenre": elif command == "PlayMusicGenre":
return self.play_genre(payload['intentArg'][0]) self.play_genre(payload['intentArg'][0])
return 'Lancement de la musique...'
return '42' return '42'
def weather_query(self, entities): def weather_query(self, entities):