Skip to content

explain_button_added #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions hotjar.js
Original file line number Diff line number Diff line change
@@ -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=');
49 changes: 48 additions & 1 deletion lib/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,56 @@
}
]



app = JupyterDash(__name__, external_stylesheets=external_stylesheets, suppress_callback_exceptions=True)

app.index_string = '''
<!DOCTYPE html>
<html>
<head>
{%metas%}
<title>{%title%}</title>
{%favicon%}
{%css%}

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-169309629-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-169309629-1');
</script>


<!-- Hotjar Tracking Code for http://3.128.188.55:8080/ -->
<script>
(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=');
</script>
</head>
<body>

{%app_entry%}
<footer>
{%config%}
{%scripts%}
{%renderer%}
</footer>

</body>
</html>
'''

app.title = "explainX.ai - Main Dashboard"


server = app.server
server = app.server
9 changes: 9 additions & 0 deletions lib/assets/custom-script.js
Original file line number Diff line number Diff line change
@@ -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=');
36 changes: 17 additions & 19 deletions lib/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})

],

Expand All @@ -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"),
Expand Down