FIXED THE MERGE CONFLICT (THANKS)
This commit is contained in:
parent
e1df8869fb
commit
af1353a41a
5 changed files with 91 additions and 27 deletions
34
py/web_flask.py
Normal file → Executable file
34
py/web_flask.py
Normal file → Executable 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_())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue