Export pyLDAvis graphs as standalone webpage

16,794

pyLDAvis.save_html should work:

p = pyLDAvis.gensim.prepare(topic_model, corpus, dictionary)
pyLDAvis.save_html(p, 'lda.html')
Share:
16,794

Related videos on Youtube

Darius
Author by

Darius

Updated on April 15, 2021

Comments

  • Darius
    Darius about 3 years

    i am analysing text with topic modelling and using Gensim and pyLDAvis for that. Would like to share the results with distant colleagues, without a need for them to install python and all required libraries. Is there a way to export interactive graphs as HTML/JS files that could be uploaded to any web server? I've found something mentioned in documentation, but have no idea how to implement it: https://github.com/bmabey/pyLDAvis/blob/master/pyLDAvis/_display.py

  • Darius
    Darius over 7 years
    It does work. Didn't expect so simple :) thanks a lot.