pritamdeka commited on
Commit
c9f7c79
Β·
verified Β·
1 Parent(s): 9ff8485

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -31
app.py CHANGED
@@ -314,41 +314,40 @@ igen_pubmed = gr.Interface(keyphrase_generator,
314
  #outputs=gr.outputs.Dataframe(type="auto", label="Retrieved Results from PubMed",max_cols=2, overflow_row_behaviour="paginate"),
315
  outputs=gr.components.JSON(label="Title and Abstracts"),
316
  #outputs=gr.outputs.File(label=None),
317
- theme="peach", layout="horizontal",
318
  title="PubMed Abstract Retriever", description="Retrieves relevant PubMed abstracts for an online article which can be used as further references. The output is in the form of JSON with <b><i>Title</i></b> and <b><i>Abstract</i></b> as the fields of the JSON output. Please note that it may take sometime for the models to load. Examples are provided below for demo purposes. Choose any one example to see the results. The models can be changed to see different results. ",
319
- #examples=[
320
- #["https://www.cancer.news/2021-12-22-mrna-vaccines-weaken-immune-system-cause-cancer.html",
321
- #'sentence-transformers/all-mpnet-base-v1',
322
- #'sentence-transformers/paraphrase-MiniLM-L12-v2',
323
- #10,
324
- #'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
325
- #15,
326
- #'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
327
 
328
- #["https://www.cancer.news/2022-02-04-doctors-testifying-covid-vaccines-causing-cancer-aids.html#",
329
- #'sentence-transformers/all-mpnet-base-v1',
330
- #'sentence-transformers/all-mpnet-base-v1',
331
- #12,
332
- #'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
333
- #11,
334
- #'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
335
 
336
- #["https://www.medicalnewstoday.com/articles/alzheimers-addressing-sleep-disturbance-may-alleviate-symptoms",
337
- #'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
338
- #'sentence-transformers/all-mpnet-base-v1',
339
- #10,
340
- #'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
341
- #10,
342
- #'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
343
 
344
- #["https://www.medicalnewstoday.com/articles/omicron-what-do-we-know-about-the-stealth-variant",
345
- # 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
346
- # 'sentence-transformers/all-mpnet-base-v1',
347
- # 15,
348
- # 'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
349
- # 10,
350
- # 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb']
351
- #],
352
  article= "This work is based on the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
353
  "\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."
354
  "\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 k titles and abstracts are retrieved from PubMed database and displayed according to relevancy. The SapBERT models can be changed as per the list provided. "
 
314
  #outputs=gr.outputs.Dataframe(type="auto", label="Retrieved Results from PubMed",max_cols=2, overflow_row_behaviour="paginate"),
315
  outputs=gr.components.JSON(label="Title and Abstracts"),
316
  #outputs=gr.outputs.File(label=None),
 
317
  title="PubMed Abstract Retriever", description="Retrieves relevant PubMed abstracts for an online article which can be used as further references. The output is in the form of JSON with <b><i>Title</i></b> and <b><i>Abstract</i></b> as the fields of the JSON output. Please note that it may take sometime for the models to load. Examples are provided below for demo purposes. Choose any one example to see the results. The models can be changed to see different results. ",
318
+ examples=[
319
+ ["https://www.cancer.news/2021-12-22-mrna-vaccines-weaken-immune-system-cause-cancer.html",
320
+ 'sentence-transformers/all-mpnet-base-v1',
321
+ 'sentence-transformers/paraphrase-MiniLM-L12-v2',
322
+ 10,
323
+ 'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
324
+ 15,
325
+ 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
326
 
327
+ ["https://www.cancer.news/2022-02-04-doctors-testifying-covid-vaccines-causing-cancer-aids.html#",
328
+ 'sentence-transformers/all-mpnet-base-v1',
329
+ 'sentence-transformers/all-mpnet-base-v1',
330
+ 12,
331
+ 'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
332
+ 11,
333
+ 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
334
 
335
+ ["https://www.medicalnewstoday.com/articles/alzheimers-addressing-sleep-disturbance-may-alleviate-symptoms",
336
+ 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
337
+ 'sentence-transformers/all-mpnet-base-v1',
338
+ 10,
339
+ 'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
340
+ 10,
341
+ 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
342
 
343
+ ["https://www.medicalnewstoday.com/articles/omicron-what-do-we-know-about-the-stealth-variant",
344
+ 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
345
+ 'sentence-transformers/all-mpnet-base-v1',
346
+ 15,
347
+ 'cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
348
+ 10,
349
+ 'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb']
350
+ ],
351
  article= "This work is based on the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
352
  "\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."
353
  "\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 k titles and abstracts are retrieved from PubMed database and displayed according to relevancy. The SapBERT models can be changed as per the list provided. "