CoolFace
Apppublic

LucasPlant/controlsim

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
control_vis_app.py47 linesDownload Raw Back to root
1import os2 3from dash import Dash, html, page_container4 5LOCAL = False6 7app = Dash(8    __name__,9    use_pages=True,10    suppress_callback_exceptions=True,11    external_stylesheets=[12        "https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap"13    ],14    assets_folder="assets",15)16 17app.index_string = """<!DOCTYPE html>18<html>19    <head>20        {%metas%}21        <title>{%title%}</title>22        {%favicon%}23        {%css%}24        <link rel="stylesheet" href="/assets/style.css">25        <meta name="viewport" content="width=device-width, initial-scale=1">26    </head>27    <body>28        {%app_entry%}29        <footer>30            {%config%}31            {%scripts%}32            {%renderer%}33        </footer>34    </body>35</html>"""36 37app.layout = html.Div(page_container, className="app-shell")38 39server = app.server40 41if __name__ == "__main__":42    port = int(os.getenv("PORT", 7860))43    if LOCAL:44        app.run(debug=True, host="127.0.0.1", port=port)45    else:46        app.run(debug=False, host="0.0.0.0", port=port)47