from monitor import Monitor from threading import Thread import uvicorn from web import app Monitor().start() web_thread = Thread( target=uvicorn.run( app=app, host='localhost', port=8000, ), ) web_thread.start()