diff --git a/hotjar.js b/hotjar.js new file mode 100644 index 0000000..36c3223 --- /dev/null +++ b/hotjar.js @@ -0,0 +1,8 @@ + (function(h,o,t,j,a,r){ + h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; + h._hjSettings={hjid:2146099,hjsv:6}; + a=o.getElementsByTagName('head')[0]; + r=o.createElement('script');r.async=1; + r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; + a.appendChild(r); + })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); diff --git a/lib/app.py b/lib/app.py index 318f57b..bb3befa 100644 --- a/lib/app.py +++ b/lib/app.py @@ -12,9 +12,56 @@ } ] + + app = JupyterDash(__name__, external_stylesheets=external_stylesheets, suppress_callback_exceptions=True) +app.index_string = ''' + + + + {%metas%} + {%title%} + {%favicon%} + {%css%} + + + + + + + + + + + + {%app_entry%} + + + + +''' + app.title = "explainX.ai - Main Dashboard" -server = app.server \ No newline at end of file +server = app.server diff --git a/lib/assets/custom-script.js b/lib/assets/custom-script.js new file mode 100644 index 0000000..61967d6 --- /dev/null +++ b/lib/assets/custom-script.js @@ -0,0 +1,9 @@ + + (function(h,o,t,j,a,r){ + h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; + h._hjSettings={hjid:2146099,hjsv:6}; + a=o.getElementsByTagName('head')[0]; + r=o.createElement('script');r.async=1; + r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; + a.appendChild(r); + })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv='); diff --git a/lib/dashboard.py b/lib/dashboard.py index 33e482f..16b809b 100644 --- a/lib/dashboard.py +++ b/lib/dashboard.py @@ -198,33 +198,24 @@ def dash(self, df, mode): available_columns = list(df.columns) - # external_stylesheets = [dbc.themes.BOOTSTRAP, - # # { - # # 'href': 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css', - # # 'rel': 'stylesheet' - # # } - # ] - - # app = JupyterDash(__name__, external_stylesheets=external_stylesheets) - app.title = "explainX.ai - Main Dashboard" PLOTLY_LOGO = "https://i.ibb.co/ZTWtVDV/explainx-logo.png" menu = dbc.Row( - [ + [ dbc.Col(dbc.NavItem(dbc.NavLink("Home", href="/apps/")), - style={'width': "150px", 'fontSize': '10px'}), + style={'width': "150px", 'fontSize': '12px'}), dbc.Col(dbc.NavItem(dbc.NavLink("Global Explanation", href="/apps/global_explanation")), - style={'width': "150px", 'fontSize': '10px'}), + style={'width': "150px", 'fontSize': '12px'}), dbc.Col(dbc.NavItem(dbc.NavLink("Local Explanation", href="/apps/local_explanation")), - style={'width': "150px", 'fontSize': '10px'}), + style={'width': "150px", 'fontSize': '12px'}), dbc.Col(dbc.NavItem(dbc.NavLink("Feature Interaction", href="/apps/feature_interaction")), - style={'width': "150px", 'fontSize': '10px'}), + style={'width': "150px", 'fontSize': '12px'}), dbc.Col(dbc.NavItem(dbc.NavLink("Distributions", href="/apps/distribution")), - style={'width': "150px", 'fontSize': '10px'}), + style={'width': "150px", 'fontSize': '12px'}), dbc.Col(dbc.NavItem(dbc.NavLink("Cohort Analysis", href="/apps/cohort")), - style={'width': "150px", 'fontSize': '10px'}) + style={'width': "150px", 'fontSize': '12px'}) ], @@ -240,13 +231,20 @@ def dash(self, df, mode): dbc.Row( [ dbc.Col(html.Img(src=PLOTLY_LOGO, height="30px")), - dbc.Col(dbc.NavbarBrand("explainX.ai", className="ml-2", - style={'fontSize': '15px', 'color': 'black'})), + dbc.Col( + dbc.NavbarBrand("explainX.ai", + style={'fontSize': '15px', 'color': 'black'} + )), + dbc.Col( + dbc.Button("Explain your own model!", + color="danger", + style={ + 'fontSize': '12px'})) ], align="center", no_gutters=True, ), - href="https://www.explainx.ai", + href="https://www.github.com/explainx/explainx", ), dbc.NavbarToggler(id="navbar-toggler"),