Skip to content
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

Display pyLDAvis #35

Closed
russell-phe opened this issue Mar 6, 2020 · 2 comments
Closed

Display pyLDAvis #35

russell-phe opened this issue Mar 6, 2020 · 2 comments

Comments

@russell-phe
Copy link

A question regarding the bokeh.models.Div workaround for running custom HTML and JS.
I am trying to display a pyLDAvis output, and I am aware the streamlit does not support this currently. I have been attempting to use the workaround in the Custom Widgets Hack, but it does not seem to work by passing in the JS and HTML outputs from the pyLDAvis.save_html() output. Do you know of any workaround that could get the display running? I have attached a sample output from pyLDAvis.save_html().

Any guidance is greatly appreciated.
lda_vis.zip

@MarcSkovMadsen
Copy link
Owner

Hi @russell-phe

I took a look unfortunately I think this is not currently possible as you would need to import some javascript libraries to get this working. I know it is on the roadmap for Streamlit.

If you need this now you could take a look at Panel. It can do it.

Stay safe

Marc

@Gotticketsto360tour
Copy link

I had this issue for what seemed like an eternity. A workaround that works for me looks like this:

html_string = pyLDAvis.prepared_data_to_html(prepared_pyLDAvis_data)
from streamlit import components
components.v1.html(diplo_string, width=1300, height=800, scrolling=True)

Hope this helps someone! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants