Add fuzzy and text-classification light model #1
2 changed files with 5 additions and 3 deletions
|
@ -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()
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Add table
Reference in a new issue