maximtrp / tmplot

Visualization of Topic Modeling Results
https://tmplot.readthedocs.org
MIT License
22 stars 1 forks source link

Report not showing #1

Closed CoteDave closed 3 years ago

CoteDave commented 3 years ago

Hi,

I tried the code example but nothing happens when running:

tmp.report(model, docs=docs, width=250)

Is it only Working inside a jupyter notebooks?

If yes, is There a way to export the chart as .html?

Finally, is it possible to plot the chart inside a streamlit application ?

Thanks!

maximtrp commented 3 years ago

Hello! Report interface is supported only in Jupyter Notebooks now. The option to export the report to a HTML file may be added in a future release. tmplot is based on Altair package, therefore it is probably possible to use the plots in a streamlit application. I need some time to explore it as I have never used it before.

CoteDave commented 3 years ago

Thanks you for the fast answer!

Make sens now! Html standalone would be a very Nice addon (to share the dashboard with business users)

Altair charts are supported in streamlit, i'll try it and let you know if it Works !

Thanks !

CoteDave commented 3 years ago

Finally, the output of tmplot.report() is a VBox object (Seems to be a mix of ipywidgets and Altair Chart). So, I did not find a way to plot it in Streamlit (I tried the altair_chart() and FigureWidget() components).

Thanks!

maximtrp commented 3 years ago

You can try visualization functions. The report is indeed a VBox object containing all the stuff.