HarryLee commited on
Commit
9afc67e
·
1 Parent(s): b45f0c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -43,7 +43,10 @@ topics, probs = fit_transform(topic_model, tiktok)
43
  placeholder = st.empty()
44
  text_input = placeholder.text_area("Enter product topic here", height=300)
45
 
46
- top_n = st.sidebar.slider("Select a number of keywords", 1, 10, 5, 1)
 
 
 
47
 
48
  similar_topics, similarity = topic_model.find_topics(text_input, top_n=top_n)
49
 
 
43
  placeholder = st.empty()
44
  text_input = placeholder.text_area("Enter product topic here", height=300)
45
 
46
+ top_n = st.sidebar.slider("Select a number of keywords", 1, 30, 5, 1)
47
+
48
+ if text_input=="":
49
+ text_input = "motor"
50
 
51
  similar_topics, similarity = topic_model.find_topics(text_input, top_n=top_n)
52