Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,9 +8,9 @@ from sklearn.manifold import TSNE
|
|
| 8 |
# import tensorflow
|
| 9 |
from gensim.models import Word2Vec
|
| 10 |
import pandas as pd
|
| 11 |
-
import threading
|
| 12 |
-
import matplotlib.pyplot as plt
|
| 13 |
-
import squarify
|
| 14 |
import numpy as np
|
| 15 |
import re
|
| 16 |
import urllib.request
|
|
@@ -24,21 +24,25 @@ st.set_page_config(page_title="OncoDigger", page_icon=":microscope:", layout="wi
|
|
| 24 |
'About': "OncoDigger is a Natural Language Processing (NLP) that harnesses Word2Vec to mine"
|
| 25 |
" insight from pubmed abstracts. Created by Jimmie E. Fata, PhD, [email protected]"})
|
| 26 |
|
| 27 |
-
analytics_code = '''
|
| 28 |
-
<head>
|
| 29 |
-
<!-- Google tag (gtag.js) -->
|
| 30 |
-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EKFSW65C2P"></script>
|
| 31 |
-
<script>
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
</script>
|
| 38 |
-
</head>
|
| 39 |
-
'''
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
# Define the HTML and CSS styles
|
| 44 |
st.markdown("""
|
|
@@ -98,8 +102,8 @@ st.markdown("---")
|
|
| 98 |
# if authenticate(password):
|
| 99 |
opt = st.sidebar.radio("Select a PubMed Corpus", options=(
|
| 100 |
'Breast Cancer corpus', 'Skin Cancer corpus', 'Lung Cancer corpus', 'Colorectal Cancer corpus',
|
| 101 |
-
'
|
| 102 |
-
'Kidney Cancer corpus'
|
| 103 |
))
|
| 104 |
# if opt == "Clotting corpus":
|
| 105 |
# model_used = ("pubmed_model_clotting")
|
|
@@ -145,10 +149,10 @@ if opt == "Uterine Cancer corpus":
|
|
| 145 |
model_used = ("uterine_cancer_pubmed_model")
|
| 146 |
num_abstracts = 72634
|
| 147 |
database_name = "Uterine_cancer"
|
| 148 |
-
if opt == "
|
| 149 |
-
model_used = ("
|
| 150 |
-
num_abstracts =
|
| 151 |
-
database_name = "
|
| 152 |
|
| 153 |
st.header(f":blue[{database_name} Pubmed corpus.]")
|
| 154 |
text_input_value = st.text_input(f"Enter one term to search within the {database_name} corpus")
|
|
|
|
| 8 |
# import tensorflow
|
| 9 |
from gensim.models import Word2Vec
|
| 10 |
import pandas as pd
|
| 11 |
+
# import threading
|
| 12 |
+
# import matplotlib.pyplot as plt
|
| 13 |
+
# import squarify
|
| 14 |
import numpy as np
|
| 15 |
import re
|
| 16 |
import urllib.request
|
|
|
|
| 24 |
'About': "OncoDigger is a Natural Language Processing (NLP) that harnesses Word2Vec to mine"
|
| 25 |
" insight from pubmed abstracts. Created by Jimmie E. Fata, PhD, [email protected]"})
|
| 26 |
|
| 27 |
+
# analytics_code = '''
|
| 28 |
+
# <head>
|
| 29 |
+
# <!-- Google tag (gtag.js) -->
|
| 30 |
+
# <script async src="https://www.googletagmanager.com/gtag/js?id=G-EKFSW65C2P"></script>
|
| 31 |
+
# <script>
|
| 32 |
+
# window.dataLayer = window.dataLayer || [];
|
| 33 |
+
# function gtag(){dataLayer.push(arguments);}
|
| 34 |
+
# gtag('js', new Date());
|
| 35 |
+
#
|
| 36 |
+
# gtag('config', 'G-EKFSW65C2P');
|
| 37 |
+
# </script>
|
| 38 |
+
# </head>
|
| 39 |
+
# '''
|
| 40 |
+
#
|
| 41 |
+
# html(analytics_code, height=0)
|
| 42 |
|
| 43 |
+
from google_analytics_component.google_analytics import google_analytics
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
google_analytics()
|
| 46 |
|
| 47 |
# Define the HTML and CSS styles
|
| 48 |
st.markdown("""
|
|
|
|
| 102 |
# if authenticate(password):
|
| 103 |
opt = st.sidebar.radio("Select a PubMed Corpus", options=(
|
| 104 |
'Breast Cancer corpus', 'Skin Cancer corpus', 'Lung Cancer corpus', 'Colorectal Cancer corpus',
|
| 105 |
+
'Lymphoma Cancer corpus', 'Prostate Cancer corpus', 'Uterine Cancer corpus', 'Urinary Cancer corpus',
|
| 106 |
+
'Kidney Cancer corpus', 'Cervical Cancer corpus'
|
| 107 |
))
|
| 108 |
# if opt == "Clotting corpus":
|
| 109 |
# model_used = ("pubmed_model_clotting")
|
|
|
|
| 149 |
model_used = ("uterine_cancer_pubmed_model")
|
| 150 |
num_abstracts = 72634
|
| 151 |
database_name = "Uterine_cancer"
|
| 152 |
+
if opt == "Cervical Cancer corpus":
|
| 153 |
+
model_used = ("cervical_cancer_pubmed_model")
|
| 154 |
+
num_abstracts = 43327
|
| 155 |
+
database_name = "Cervical_cancer"
|
| 156 |
|
| 157 |
st.header(f":blue[{database_name} Pubmed corpus.]")
|
| 158 |
text_input_value = st.text_input(f"Enter one term to search within the {database_name} corpus")
|