jfataphd commited on
Commit
e80527e
1 Parent(s): 4d2b0b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -67,18 +67,18 @@ st.markdown("""
67
  st.header(":red[*O*]nco:red[*D*]igger")
68
 
69
  st.subheader(
70
- "*A web app designed to explore :red[*PubMed abstracts*] for deeper understanding and fresh insights, driven "
71
- "by Machine Learning and Natural Language Processing (NLP) algorithms.*")
72
 
73
 
74
  def custom_subheader(text, identifier, font_size):
75
  st.markdown(f"<h3 id='{identifier}' style='font-size: {font_size}px;'>{text}</h3>", unsafe_allow_html=True)
76
 
77
 
78
- custom_subheader("To begin, simply select a corpus from the left sidebar and enter a keyword "
79
  "you wish to explore within the corpus. OncoDigger will determine the top words, "
80
  "genes, drugs, phytochemicals, and compounds that are contextually and semantically related "
81
- "to your input. Dive in and enjoy the exploration!",
82
  "unique-id", 18)
83
 
84
  st.markdown("---")
@@ -117,10 +117,6 @@ if opt == "Lung Cancer corpus":
117
  model_used = ("lung_cancer_pubmed_model")
118
  num_abstracts = 143886
119
  database_name = "Lung_cancer"
120
- if opt == "Breast Cancer corpus":
121
- model_used = ("pubmed_model_breast_cancer2")
122
- num_abstracts = 204381
123
- database_name = "Breast_cancer"
124
  if opt == "Colorectal Cancer corpus":
125
  model_used = ("colorectal_cancer_pubmed_model")
126
  num_abstracts = 140000
@@ -164,6 +160,11 @@ if query:
164
  # print(model.wv.similar_by_word('bfgf', topn=50, restrict_vocab=None))
165
  df = pd.DataFrame(X)
166
 
 
 
 
 
 
167
  def get_compound_ids(compound_names):
168
  with concurrent.futures.ThreadPoolExecutor() as executor:
169
  compound_ids = list(executor.map(get_compound_id, compound_names))
 
67
  st.header(":red[*O*]nco:red[*D*]igger")
68
 
69
  st.subheader(
70
+ "A web app designed to explore massive amounts of :red[*PubMed abstracts*] for a deeper understanding of your research. Results are driven "
71
+ "by Machine Learning and Natural Language Processing algorithms, which allow you to scan and mine information from hundreds of thousands of abstracts in seconds.")
72
 
73
 
74
  def custom_subheader(text, identifier, font_size):
75
  st.markdown(f"<h3 id='{identifier}' style='font-size: {font_size}px;'>{text}</h3>", unsafe_allow_html=True)
76
 
77
 
78
+ custom_subheader("To begin, simply select a cancer corpus from the left sidebar and enter a keyword "
79
  "you wish to explore within the corpus. OncoDigger will determine the top words, "
80
  "genes, drugs, phytochemicals, and compounds that are contextually and semantically related "
81
+ "to your input, both directly and indirectly. Dive in and enjoy the exploration!",
82
  "unique-id", 18)
83
 
84
  st.markdown("---")
 
117
  model_used = ("lung_cancer_pubmed_model")
118
  num_abstracts = 143886
119
  database_name = "Lung_cancer"
 
 
 
 
120
  if opt == "Colorectal Cancer corpus":
121
  model_used = ("colorectal_cancer_pubmed_model")
122
  num_abstracts = 140000
 
160
  # print(model.wv.similar_by_word('bfgf', topn=50, restrict_vocab=None))
161
  df = pd.DataFrame(X)
162
 
163
+ if 'melanin' in model.wv.key_to_index:
164
+ print("The term 'melanin' is present in the model.")
165
+ else:
166
+ print("The term 'melanin' is not present in the model.")
167
+
168
  def get_compound_ids(compound_names):
169
  with concurrent.futures.ThreadPoolExecutor() as executor:
170
  compound_ids = list(executor.map(get_compound_id, compound_names))