jfataphd commited on
Commit
66e83e0
·
1 Parent(s): 105ed33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -9,6 +9,7 @@ import numpy as np
9
  import re
10
  import urllib.request
11
  import random
 
12
 
13
  st.set_page_config(
14
  page_title="FATA4 Science",
@@ -51,9 +52,9 @@ if opt == "Neuroblastoma corpus":
51
  num_abstracts = 29032
52
  database_name = "Neuroblastoma"
53
 
54
- st.header(":red[Fast Acting Text Analysis (FATA) 4 Science]")
55
 
56
- st.subheader(":red[Uncovering knowledge through Natural Language Processing (NLP)]")
57
  st.markdown("---")
58
 
59
  st.header(f":blue[{database_name} Pubmed corpus.]")
@@ -110,9 +111,11 @@ if query:
110
 
111
  short_table.set_index('Word', inplace=True)
112
  squarify.plot(sizes=sizes, label=short_table.index.tolist(), color=color, edgecolor="#EBF5FB",
113
- text_kwargs={'fontsize': 10})
114
  # # plot the treemap using matplotlib
115
  plt.axis('off')
 
 
116
  fig = plt.gcf()
117
  fig.patch.set_facecolor('#CCFFFF')
118
  # # display the treemap in Streamlit
@@ -158,7 +161,6 @@ if query:
158
  plt.axis('off')
159
  fig2 = plt.gcf()
160
  fig2.patch.set_facecolor('#CCFFFF')
161
- # plt.show()
162
  #
163
  # # display the treemap in Streamlit
164
  with treemap2:
@@ -205,3 +207,12 @@ if query:
205
  with c3:
206
  st.video("https://www.youtube.com/watch?v=" + video_ids[2])
207
  st.markdown("---")
 
 
 
 
 
 
 
 
 
 
9
  import re
10
  import urllib.request
11
  import random
12
+ import plotly.express as px
13
 
14
  st.set_page_config(
15
  page_title="FATA4 Science",
 
52
  num_abstracts = 29032
53
  database_name = "Neuroblastoma"
54
 
55
+ st.header(":red[*F*]ast :red[*A*]cting :red[*T*]ext :red[*A*]nalysis (:red[*FATA*]) 4 Science")
56
 
57
+ st.subheader("Uncovering knowledge through Natural Language Processing (NLP)")
58
  st.markdown("---")
59
 
60
  st.header(f":blue[{database_name} Pubmed corpus.]")
 
111
 
112
  short_table.set_index('Word', inplace=True)
113
  squarify.plot(sizes=sizes, label=short_table.index.tolist(), color=color, edgecolor="#EBF5FB",
114
+ text_kwargs={'fontsize': 10},)
115
  # # plot the treemap using matplotlib
116
  plt.axis('off')
117
+ # Add legend to top right, outside plot region
118
+ # plt.legend("upper right", bbox_to_anchor=(-.2, 0))
119
  fig = plt.gcf()
120
  fig.patch.set_facecolor('#CCFFFF')
121
  # # display the treemap in Streamlit
 
161
  plt.axis('off')
162
  fig2 = plt.gcf()
163
  fig2.patch.set_facecolor('#CCFFFF')
 
164
  #
165
  # # display the treemap in Streamlit
166
  with treemap2:
 
207
  with c3:
208
  st.video("https://www.youtube.com/watch?v=" + video_ids[2])
209
  st.markdown("---")
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+