clear command line on finish, add menu
This commit is contained in:
parent
ab09962900
commit
5e16a186e8
@ -1,5 +1,6 @@
|
|||||||
import string
|
import string
|
||||||
from typing import Any, List, Tuple
|
from typing import Any, List, Tuple
|
||||||
|
import os
|
||||||
|
|
||||||
import jsgf
|
import jsgf
|
||||||
from unidecode import unidecode
|
from unidecode import unidecode
|
||||||
@ -255,9 +256,25 @@ class NLG():
|
|||||||
return random.choice(self.messages["reqmore"])
|
return random.choice(self.messages["reqmore"])
|
||||||
|
|
||||||
elif act == "offer":
|
elif act == "offer":
|
||||||
return "Proszę oto menu zeskanuj kod QR aby je zobaczyć."
|
return "Oto nasze menu: tatar, poledwica, pizza, tiramisu, zrazy [wolowe], pyzy, placki, makaron, picia, zupa, ryba, zupe grzybowa, stek \n Pragniemy zaznaczyć, że nie które dania mogą być niedostępne"
|
||||||
|
|
||||||
|
|
||||||
|
def ascii_jarvis():
|
||||||
|
print(''''
|
||||||
|
____. _____ ______________ ____.___ _________
|
||||||
|
| | / _ ______ \ \ / /| |/ _____/
|
||||||
|
| |/ /_\ \| _/\ Y / | |\_____ \
|
||||||
|
/\__| / | \ | \ \ / | |/ |
|
||||||
|
\________\____|__ /____|_ / \___/ |___/_______ /
|
||||||
|
\/ \/ \/ ' ''')
|
||||||
|
|
||||||
|
def clear_console():
|
||||||
|
operating_system = os.name
|
||||||
|
if operating_system == 'nt':
|
||||||
|
os.system('cls')
|
||||||
|
else:
|
||||||
|
os.system('clear')
|
||||||
|
|
||||||
def dialogue_test():
|
def dialogue_test():
|
||||||
model = Model()
|
model = Model()
|
||||||
|
|
||||||
@ -329,21 +346,18 @@ def dialogue_test():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
model = Model()
|
model = Model()
|
||||||
print(''''
|
ascii_jarvis()
|
||||||
____. _____ ______________ ____.___ _________
|
|
||||||
| | / _ ______ \ \ / /| |/ _____/
|
|
||||||
| |/ /_\ \| _/\ Y / | |\_____ \
|
|
||||||
/\__| / | \ | \ \ / | |/ |
|
|
||||||
\________\____|__ /____|_ / \___/ |___/_______ /
|
|
||||||
\/ \/ \/ ' ''')
|
|
||||||
print("Chatbot Jarvis\n--------------")
|
print("Chatbot Jarvis\n--------------")
|
||||||
|
print("Dostępe komendy: \n\n- SYSTEM_FINISH - zakończenie rozmowy\n- Pokaz menu - wyświetlenie menu\n")
|
||||||
while True:
|
while True:
|
||||||
print("\nUżytkownik: ")
|
print("\nUżytkownik: ")
|
||||||
user_input = input()
|
user_input = input()
|
||||||
while user_input == "SYSTEM_FINISH":
|
while user_input == "SYSTEM_FINISH":
|
||||||
print("\n\n\n\n\n\n\n\n\n\n\n\n")
|
clear_console()
|
||||||
model = Model()
|
model = Model()
|
||||||
|
ascii_jarvis()
|
||||||
print("Chatbot Jarvis\n--------------")
|
print("Chatbot Jarvis\n--------------")
|
||||||
|
print("Dostępe komendy: \n- SYSTEM_FINISH - zakończenie rozmowy\n- Pokaz menu - wyświetlenie menu\n")
|
||||||
print("\nUżytkownik: ")
|
print("\nUżytkownik: ")
|
||||||
user_input = input()
|
user_input = input()
|
||||||
response = model(user_input, debug=False)
|
response = model(user_input, debug=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user