from __future__ import division
import graphlab as gl
import pandas as pd
import pyLDAvis
import pyLDAvis.graphlab
pyLDAvis.enable_notebook()
stories_sf = gl.load_sframe("hn_processed.sframe")
bows = stories_sf['bow']
topic_model = gl.topic_model.create(bows, num_topics=100, num_iterations=200)
pyLDAvis.graphlab.prepare(topic_model, bows)