Integration into a Flask application
How can we embed the dashboard into an existing Flask app ?
Hi @rchaudron,
What kind of embedding do you have in mind, have the whole dashboard presented behind a specific URL path?
Here's a very hackish way:
from interpret import show_link
# ... create the results you want to show
# e.g. marginal, ebm_global, ebm_perf from the example notebooks
# You can get the local server link directly, and redirect to it/embed it:
link = show_link([marginal, emb_global, ebm_perf])
To actually integrate your dashboard "cleanly" into the app, you need to find the Dash app itself and check this guide: Integrating Dash with Existing Web Apps. As far as I can see, it's currently "one app per process", see: https://github.com/microsoft/interpret/blob/master/src/python/interpret/visual/interactive.py#L9
Here's a very hackish way:
from interpret import show_link # ... create the results you want to show # e.g. marginal, ebm_global, ebm_perf from the example notebooks # You can get the local server link directly, and redirect to it/embed it: link = show_link([marginal, emb_global, ebm_perf])To actually integrate your dashboard "cleanly" into the app, you need to find the Dash app itself and check this guide: Integrating Dash with Existing Web Apps. As far as I can see, it's currently "one app per process", see: https://github.com/microsoft/interpret/blob/master/src/python/interpret/visual/interactive.py#L9
The link provided is not working, can you please share a valid one. We are also trying to integrate with Flask.
The equivalent link to @NowanIlfideme's link above would be: https://github.com/interpretml/interpret/blob/f4a3f08cb95c3c99eb389a2a86e4f76a36af3395/python/interpret-core/interpret/visual/interactive.py#L9