forked from Mika-Project/mika-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.py
30 lines (23 loc) · 806 Bytes
/
script.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from dotenv import load_dotenv
import eel
from modules.install_dependencies import install_dependencies
from modules.chat_with_user import chat_with_user
from modules.text_chat_with_user import text_chat_with_user
##############################
# Load environment variables #
##############################
load_dotenv()
eel.init("web")
@eel.expose
def startVoice():
# Start commands
install_dependencies() # Install dependencies
chat_with_user() # Start the conversation loop
@eel.expose
def startText(userInput):
justUserInputString = userInput['FormData']['command']
text_chat_with_user(justUserInputString)
eel.start("index.html", size=(400, 800))
# DEBUG.
# answer = answers("Hey mika, can you tell me the current time")
# text_to_speech(answer)