FIXED THE MERGE CONFLICT (THANKS)

This commit is contained in:
Patrick_Pluto 2024-09-17 12:36:32 +02:00
parent e1df8869fb
commit af1353a41a
5 changed files with 91 additions and 27 deletions

34
py/web_flask.py Normal file → Executable file
View file

@ -1,6 +1,14 @@
#!venv/bin/python
from flask import Flask, request, render_template
from api import API
from voice_recognition import Voice
import sys
import threading
from PyQt5.QtCore import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtWidgets import *
APP = Flask(__name__)
api = API()
@ -49,6 +57,28 @@ def contact():
if __name__ == '__main__':
APP.run(debug=True)
qapp = QApplication(sys.argv)
# This is a comment --> test if this creates a merge conflict
view = QWebEngineView()
view.setGeometry(100, 100, 1280, 720)
view.setWindowTitle("InterstellarAI")
view.setUrl(QUrl("http://localhost:5000"))
view.show()
def run_flask():
APP.run()
def stop_flask():
thread.join()
qapp.quit()
thread = threading.Thread(target=run_flask)
thread.daemon = True
thread.start()
qapp.aboutToQuit.connect(stop_flask)
sys.exit(qapp.exec_())