How to load html file directly on Dash


I am trying to load html file “test2.html” directly on Dash. Please how can I go about this, I have the following code snippet:

from flask import Flask
import flask
import webbrowser
import os

STATIC_PATH = os.path.join(os.path.dirname(os.path.abspath(file)), ‘static’)

server = Flask(name)
app = dash.Dash(name = name, server = server)

app.layout = html.Div(

def serve_static(path):
root_dir = os.getcwd()
return flask.send_from_directory(os.path.join(root_dir, ‘static’), path)

if name == ‘main’:
app.run_server(host=‘’, port=8090)

There is probably a better way to do what you are trying to do, but you can load raw HTML in using the package i made an example here with both statically loaded HTML and generated html from pandas

this doesnt work. can you show me an example?