@app.route('/<username>/viz_tm/<int:folder_id>/')
def topic_model_viz(username=None, folder_id=None):
    f = Folder.query.get(folder_id)
    ex = Experiment.query.get(f.tm_id)
    ei = ex.getExInfo()
    vocabfile = f.vocab_path()
    vocab = [x.strip() for x in open(vocabfile,'r')]
    totalDox = f.N()
    return render_template("topicmodel.html", d=f, ex=ex, vocab=vocab, totalDox=totalDox, stopwords=" ".join(ei.stopwords))
serve the topic model visualization
dataset/ETHPy150Open daeilkim/refinery/refinery/refinery/webapp/topicmodel.py/topic_model_viz