Spaces:
Runtime error
Runtime error
pritamdeka
commited on
Update app.py
Browse files
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 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
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. "
|