Hi,
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(
html.Iframe(src=’/home/makinde/test2.html’)
)
@server.route(’/static/path:path’)
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=‘0.0.0.0’, port=8090)