Fixed embeds

This commit is contained in:
Patrick_Pluto 2024-09-16 15:14:24 +02:00
parent e1529430cc
commit 72538174b2
3 changed files with 11 additions and 0 deletions

View file

@ -1,11 +1,15 @@
from flask import Flask, request, render_template
from api import API
from voice_recognition import Voice
APP = Flask(__name__)
api = API()
voice = Voice()
messages = []
# The following method shows the user the GUI and does the backend connections to the API.
@APP.route('/', methods=['GET', 'POST'])
def index():
global messages
@ -16,6 +20,7 @@ def index():
user_message = request.form['user_message']
if option == "voice":
user_message = voice.listen()
messages.append(f"User: {user_message}")
elif option == "chat":
messages.append(f"User: {user_message}")