interpret icon indicating copy to clipboard operation
interpret copied to clipboard

Integration into a Flask application

Open rchaudron opened this issue 6 years ago • 3 comments

How can we embed the dashboard into an existing Flask app ?

rchaudron avatar May 29 '19 08:05 rchaudron

Hi @rchaudron,

What kind of embedding do you have in mind, have the whole dashboard presented behind a specific URL path?

interpret-ml avatar May 31 '19 05:05 interpret-ml

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

NowanIlfideme avatar Jun 14 '19 12:06 NowanIlfideme

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.

karthikkunala avatar May 04 '20 08:05 karthikkunala

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

paulbkoch avatar Jan 21 '23 17:01 paulbkoch