pritamdeka commited on
Commit
e1a6df8
Β·
1 Parent(s): 1b84dcb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -271,12 +271,6 @@ def keyphrase_generator(article_link, model_1, model_2, max_num_keywords, model_
271
  return df_final
272
 
273
 
274
- examples = [
275
- ["https://www.medicalnewstoday.com/articles/alzheimers-addressing-sleep-disturbance-may-alleviate-symptoms"],
276
- ["https://www.medicalnewstoday.com/articles/omicron-what-do-we-know-about-the-stealth-variant"],
277
- ["https://www.cancer.news/2022-02-04-doctors-testifying-covid-vaccines-causing-cancer-aids.html#",
278
- ["https://www.cancer.news/2021-12-22-mrna-vaccines-weaken-immune-system-cause-cancer.html"]]
279
-
280
  igen_pubmed = gr.Interface(keyphrase_generator,
281
  inputs=[gr.inputs.Textbox(lines=1, placeholder="Provide article web link here (Can be chosen from examples below)",default="", label="Article web link"),
282
  gr.inputs.Dropdown(choices=['sentence-transformers/all-mpnet-base-v2',
@@ -325,7 +319,10 @@ igen_pubmed = gr.Interface(keyphrase_generator,
325
  outputs=gr.outputs.Dataframe(type="auto", label="Retrieved Results from PubMed",max_cols=None, overflow_row_behaviour="paginate"),
326
  theme="dark-peach",
327
  title="PubMed Abstract Retriever", description="Retrieves relevant PubMed abstracts for an online article which can be used as further references. Please note that it may take sometime for the models to load.",
328
- examples=examples,
 
 
 
329
  article= "This work is based on the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
330
  "\t It uses the TextRank algorithm with SBERT to first find the top sentences and then extracts the keyphrases from those sentences using scispaCy and SBERT."
331
  "\t The application then uses a UMLS based BERT model, <a href=https://arxiv.org/abs/2010.11784>SapBERT</a> to cluster the keyphrases using K-means clustering method and finally create a boolean query. After that the top 10 titles and abstracts are retrieved from PubMed database and displayed according to relevancy. The SapBERT models can be changed as per the list provided. "
 
271
  return df_final
272
 
273
 
 
 
 
 
 
 
274
  igen_pubmed = gr.Interface(keyphrase_generator,
275
  inputs=[gr.inputs.Textbox(lines=1, placeholder="Provide article web link here (Can be chosen from examples below)",default="", label="Article web link"),
276
  gr.inputs.Dropdown(choices=['sentence-transformers/all-mpnet-base-v2',
 
319
  outputs=gr.outputs.Dataframe(type="auto", label="Retrieved Results from PubMed",max_cols=None, overflow_row_behaviour="paginate"),
320
  theme="dark-peach",
321
  title="PubMed Abstract Retriever", description="Retrieves relevant PubMed abstracts for an online article which can be used as further references. Please note that it may take sometime for the models to load.",
322
+ examples=[["https://www.medicalnewstoday.com/articles/alzheimers-addressing-sleep-disturbance-may-alleviate-symptoms"],
323
+ ["https://www.medicalnewstoday.com/articles/omicron-what-do-we-know-about-the-stealth-variant"],
324
+ ["https://www.cancer.news/2022-02-04-doctors-testifying-covid-vaccines-causing-cancer-aids.html#",
325
+ ["https://www.cancer.news/2021-12-22-mrna-vaccines-weaken-immune-system-cause-cancer.html"]],
326
  article= "This work is based on the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
327
  "\t It uses the TextRank algorithm with SBERT to first find the top sentences and then extracts the keyphrases from those sentences using scispaCy and SBERT."
328
  "\t The application then uses a UMLS based BERT model, <a href=https://arxiv.org/abs/2010.11784>SapBERT</a> to cluster the keyphrases using K-means clustering method and finally create a boolean query. After that the top 10 titles and abstracts are retrieved from PubMed database and displayed according to relevancy. The SapBERT models can be changed as per the list provided. "