import os, sys, threading, webview

from main import run

if __name__ == "__main__":
    t = threading.Thread(target=run)
    t.daemon = True
    t.start()

    port = int(os.environ.get("PORT", 5000))
    webview.create_window('Sauce', f"http://localhost:{port}/")
    webview.start()
    sys.exit()
import os, sys, threading, webview

from main import run

if __name__ == "__main__":
    t = threading.Thread(target=run)
    t.daemon = True
    t.start()

    port = int(os.environ.get("PORT", 5000))
    webview.create_window('Sauce', f"http://localhost:{port}/")
    webview.start()
    sys.exit()