Manish-4007 commited on
Commit
01aa817
·
1 Parent(s): 4c57eb5

add generation time

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -34,10 +34,11 @@ whole_text = st.text_input("Enter the text Here: ")
34
 
35
  try:
36
  if st.button('Suggest topic'):
 
37
  with st.spinner("Scanning content to suggest topics"):
38
  topic_classifier = st.session_state.topic_model
39
  predicted_topic = suggest_topic(topic_classifier,whole_text)
40
-
41
  st.subheader('Top 10 Topics related to the content')
42
  for i in predicted_topic[:10]:
43
  st.write(i)
 
34
 
35
  try:
36
  if st.button('Suggest topic'):
37
+ start = time.now()
38
  with st.spinner("Scanning content to suggest topics"):
39
  topic_classifier = st.session_state.topic_model
40
  predicted_topic = suggest_topic(topic_classifier,whole_text)
41
+ st.write(f'Generated in {(time.now()-start)*1000} secs')
42
  st.subheader('Top 10 Topics related to the content')
43
  for i in predicted_topic[:10]:
44
  st.write(i)