Spaces:
Running
Running
Update pages/2 Topic Modeling.py
Browse files- pages/2 Topic Modeling.py +23 -14
pages/2 Topic Modeling.py
CHANGED
@@ -370,26 +370,35 @@ if uploaded_file is not None:
|
|
370 |
tab1, tab2, tab3 = st.tabs(["📈 Generate visualization", "📃 Reference", "📓 Recommended Reading"])
|
371 |
with tab1:
|
372 |
try:
|
373 |
-
with st.spinner('Performing computations. Please wait ...'):
|
|
|
|
|
374 |
topic_model, topic_time, topics, probs = bertopic_vis(extype)
|
|
|
375 |
fig1 = Vis_Topics(extype)
|
|
|
376 |
fig2 = Vis_Documents(extype)
|
|
|
377 |
fig3 = Vis_Hierarchy(extype)
|
|
|
378 |
fig4 = Vis_Heatmap(extype)
|
|
|
379 |
fig5 = Vis_Barchart(extype)
|
|
|
380 |
fig6 = Vis_ToT(extype)
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
|
|
393 |
|
394 |
except ValueError:
|
395 |
st.error('🙇♂️ Please raise the number of topics and click submit')
|
@@ -402,4 +411,4 @@ if uploaded_file is not None:
|
|
402 |
|
403 |
with tab3:
|
404 |
st.markdown('**Jeet Rawat, A., Ghildiyal, S., & Dixit, A. K. (2022, December 1). Topic modelling of legal documents using NLP and bidirectional encoder representations from transformers. Indonesian Journal of Electrical Engineering and Computer Science, 28(3), 1749.** https://doi.org/10.11591/ijeecs.v28.i3.pp1749-1755')
|
405 |
-
st.markdown('**Yao, L. F., Ferawati, K., Liew, K., Wakamiya, S., & Aramaki, E. (2023, April 20). Disruptions in the Cystic Fibrosis Community’s Experiences and Concerns During the COVID-19 Pandemic: Topic Modeling and Time Series Analysis of Reddit Comments. Journal of Medical Internet Research, 25, e45249.** https://doi.org/10.2196/45249')
|
|
|
370 |
tab1, tab2, tab3 = st.tabs(["📈 Generate visualization", "📃 Reference", "📓 Recommended Reading"])
|
371 |
with tab1:
|
372 |
try:
|
373 |
+
#with st.spinner('Performing computations. Please wait ...'):
|
374 |
+
with st.status('Status...', expanded=True) as status:
|
375 |
+
|
376 |
topic_model, topic_time, topics, probs = bertopic_vis(extype)
|
377 |
+
st.write("⏳ Visualizing topics....")
|
378 |
fig1 = Vis_Topics(extype)
|
379 |
+
st.write("⏳ Visualizing documents....")
|
380 |
fig2 = Vis_Documents(extype)
|
381 |
+
st.write("⏳ Visualizing hierarcy....")
|
382 |
fig3 = Vis_Hierarchy(extype)
|
383 |
+
st.write("⏳ Visualizing similarity....")
|
384 |
fig4 = Vis_Heatmap(extype)
|
385 |
+
st.write("⏳ Visualizing terms....")
|
386 |
fig5 = Vis_Barchart(extype)
|
387 |
+
st.write("⏳ Visualizing topics over time....")
|
388 |
fig6 = Vis_ToT(extype)
|
389 |
+
status.update(label="Completed", expanded=False)
|
390 |
+
with st.expander("Visualize Topics"):
|
391 |
+
st.write(fig1)
|
392 |
+
with st.expander("Visualize Terms"):
|
393 |
+
st.write(fig5)
|
394 |
+
with st.expander("Visualize Documents"):
|
395 |
+
st.write(fig2)
|
396 |
+
with st.expander("Visualize Document Hierarchy"):
|
397 |
+
st.write(fig3)
|
398 |
+
with st.expander("Visualize Topic Similarity"):
|
399 |
+
st.write(fig4)
|
400 |
+
with st.expander("Visualize Topics over Time"):
|
401 |
+
st.write(fig6)
|
402 |
|
403 |
except ValueError:
|
404 |
st.error('🙇♂️ Please raise the number of topics and click submit')
|
|
|
411 |
|
412 |
with tab3:
|
413 |
st.markdown('**Jeet Rawat, A., Ghildiyal, S., & Dixit, A. K. (2022, December 1). Topic modelling of legal documents using NLP and bidirectional encoder representations from transformers. Indonesian Journal of Electrical Engineering and Computer Science, 28(3), 1749.** https://doi.org/10.11591/ijeecs.v28.i3.pp1749-1755')
|
414 |
+
st.markdown('**Yao, L. F., Ferawati, K., Liew, K., Wakamiya, S., & Aramaki, E. (2023, April 20). Disruptions in the Cystic Fibrosis Community’s Experiences and Concerns During the COVID-19 Pandemic: Topic Modeling and Time Series Analysis of Reddit Comments. Journal of Medical Internet Research, 25, e45249.** https://doi.org/10.2196/45249')
|