davanstrien HF staff commited on
Commit
8eb7477
1 Parent(s): ebf2074
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,7 +19,7 @@ fig = topic_model.visualize_topics()
19
 
20
  def plot_docs():
21
  docs = prep_dataset()
22
- return topic_model.visualize_documents(docs)
23
 
24
 
25
  def search_topic(text):
@@ -46,7 +46,7 @@ with gr.Blocks() as demo:
46
  with gr.Tab("Topic distribution"):
47
  gr.Plot(fig)
48
 
49
- # with gr.Tab("Doc visualization"):
50
- # gr.Plot(plot_docs())
51
 
52
  demo.launch(debug=True)
 
19
 
20
  def plot_docs():
21
  docs = prep_dataset()
22
+ return topic_model.visualize_documents(docs,sample=0.05)
23
 
24
 
25
  def search_topic(text):
 
46
  with gr.Tab("Topic distribution"):
47
  gr.Plot(fig)
48
 
49
+ with gr.Tab("Doc visualization"):
50
+ gr.Plot(plot_docs())
51
 
52
  demo.launch(debug=True)