Spaces:
Runtime error
Runtime error
pritamdeka
commited on
Commit
Β·
c5302cd
1
Parent(s):
7437669
Update app.py
Browse files
app.py
CHANGED
@@ -285,7 +285,7 @@ igen_pubmed = gr.Interface(keyphrase_generator,
|
|
285 |
'sentence-transformers/sentence-t5-large',
|
286 |
'sentence-transformers/sentence-t5-base'],
|
287 |
type="value",
|
288 |
-
|
289 |
label="Select any SBERT model for TextRank from the list below"),
|
290 |
gr.inputs.Dropdown(choices=['sentence-transformers/paraphrase-mpnet-base-v2',
|
291 |
'sentence-transformers/all-mpnet-base-v1',
|
@@ -302,19 +302,19 @@ igen_pubmed = gr.Interface(keyphrase_generator,
|
|
302 |
'sentence-transformers/paraphrase-MiniLM-L3-v2',
|
303 |
'sentence-transformers/all-MiniLM-L6-v2'],
|
304 |
type="value",
|
305 |
-
|
306 |
label="Select any SBERT model for keyphrases from the list below"),
|
307 |
gr.inputs.Slider(minimum=5, maximum=20, step=1, default=10, label="Max Keywords"),
|
308 |
gr.inputs.Dropdown(choices=['cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
|
309 |
'cambridgeltl/SapBERT-from-PubMedBERT-fulltext-mean-token'],
|
310 |
type="value",
|
311 |
-
|
312 |
label="Select any SapBERT model for clustering from the list below"),
|
313 |
gr.inputs.Slider(minimum=5, maximum=15, step=1, default=10, label="PubMed Max Abstracts"),
|
314 |
gr.inputs.Dropdown(choices=['pritamdeka/S-Bluebert-snli-multinli-stsb',
|
315 |
'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
|
316 |
type="value",
|
317 |
-
|
318 |
label="Select any SBERT model for abstracts from the list below")],
|
319 |
outputs=gr.outputs.Dataframe(type="auto", label="Retrieved Results from PubMed",max_cols=None, overflow_row_behaviour="paginate"),
|
320 |
theme="dark-peach",
|
@@ -355,7 +355,7 @@ igen_pubmed = gr.Interface(keyphrase_generator,
|
|
355 |
"\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."
|
356 |
"\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. "
|
357 |
"\t The list of SBERT models required in the textboxes can be found in <a href=www.sbert.net/docs/pretrained_models.html>SBERT Pre-trained models hub</a>."
|
358 |
-
"\t The model names can be changed from the list of
|
359 |
"\t The value of keyphrases can be changed. The default value is 10, minimum is 5 and a maximum value of 20. "
|
360 |
"\t The value of maximum abstracts to be retrieved can be changed. The minimum is 5, default is 10 and a maximum of 15.")
|
361 |
|
|
|
285 |
'sentence-transformers/sentence-t5-large',
|
286 |
'sentence-transformers/sentence-t5-base'],
|
287 |
type="value",
|
288 |
+
default='pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
|
289 |
label="Select any SBERT model for TextRank from the list below"),
|
290 |
gr.inputs.Dropdown(choices=['sentence-transformers/paraphrase-mpnet-base-v2',
|
291 |
'sentence-transformers/all-mpnet-base-v1',
|
|
|
302 |
'sentence-transformers/paraphrase-MiniLM-L3-v2',
|
303 |
'sentence-transformers/all-MiniLM-L6-v2'],
|
304 |
type="value",
|
305 |
+
default='sentence-transformers/all-mpnet-base-v1',
|
306 |
label="Select any SBERT model for keyphrases from the list below"),
|
307 |
gr.inputs.Slider(minimum=5, maximum=20, step=1, default=10, label="Max Keywords"),
|
308 |
gr.inputs.Dropdown(choices=['cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
|
309 |
'cambridgeltl/SapBERT-from-PubMedBERT-fulltext-mean-token'],
|
310 |
type="value",
|
311 |
+
default='cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
|
312 |
label="Select any SapBERT model for clustering from the list below"),
|
313 |
gr.inputs.Slider(minimum=5, maximum=15, step=1, default=10, label="PubMed Max Abstracts"),
|
314 |
gr.inputs.Dropdown(choices=['pritamdeka/S-Bluebert-snli-multinli-stsb',
|
315 |
'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb'],
|
316 |
type="value",
|
317 |
+
default='pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
|
318 |
label="Select any SBERT model for abstracts from the list below")],
|
319 |
outputs=gr.outputs.Dataframe(type="auto", label="Retrieved Results from PubMed",max_cols=None, overflow_row_behaviour="paginate"),
|
320 |
theme="dark-peach",
|
|
|
355 |
"\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."
|
356 |
"\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. "
|
357 |
"\t The list of SBERT models required in the textboxes can be found in <a href=www.sbert.net/docs/pretrained_models.html>SBERT Pre-trained models hub</a>."
|
358 |
+
"\t The model names can be changed from the list of pre-trained models provided. "
|
359 |
"\t The value of keyphrases can be changed. The default value is 10, minimum is 5 and a maximum value of 20. "
|
360 |
"\t The value of maximum abstracts to be retrieved can be changed. The minimum is 5, default is 10 and a maximum of 15.")
|
361 |
|