I am trying to run a dash app in a uvicorn server. The app is very simple, just displays the text 'hello' to the screen. The code is as follows:
from dash import Dash, html
dash_app = Dash(__name__)
dash_app.layout = html.Div(id='main-layout', children=["hello"])
If I run the app using dash_app.run() the app runs as expected and I can visit the page on localhost.
However, I am trying to run the app using uvicorn. The command that I am using to start the server looks like this:
uvicorn uvicorn_test.__main__:dash_app
I am running the main file in that exists in a directory called uvicorn_test.
When I run the uvicorn command, the server starts up, but when I try to access the web page, I am getting an error that says "TypeError: 'Dash' object is not callable"