pritamdeka commited on
Commit
a106d75
Β·
1 Parent(s): 46af800

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -214,7 +214,7 @@ def keyphrase_generator(article_link, model_1, model_2, max_num_keywords):
214
  search_id='&id='+all_search_ids
215
  ret_type='&rettype=text'
216
  ret_mode='&retmode=xml'
217
- ret_max='&retmax=20'
218
  ret_sort='&sort=relevance'
219
  return_url=ncbi_url+fetch_url+search_id+ret_type+ret_mode+ret_max+ret_sort
220
  pubmed_abstract_request = requests.get(return_url)
@@ -270,12 +270,12 @@ igen_pubmed = gr.Interface(keyphrase_generator,
270
  default='sentence-transformers/all-mpnet-base-v1',
271
  label="Select any SBERT model for keyphrases from the list below"),
272
  gr.inputs.Slider(minimum=5, maximum=30, step=1, default=10, label="Max Keywords")],
273
- outputs=gr.outputs.Dataframe(type="auto", label="dataframe",max_cols=None, max_rows=10, overflow_row_behaviour="paginate"),
274
  theme="dark-peach",
275
  title="PubMed Abstract Retriever", description="Retrieves relevant PubMed abstracts for an online article which can be used as further references.",
276
  article= "This work is based on the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
277
  "\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."
278
- "\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 20 titles and abstracts are retrieved from PubMed database and displayed according to relevancy. "
279
  "\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>."
280
  "\t The default model names are provided which can be changed from the list of pretrained models. "
281
  "\t The value of keyphrases can be changed. The default value is 10, minimum is 5 and a maximum value of 30.")
 
214
  search_id='&id='+all_search_ids
215
  ret_type='&rettype=text'
216
  ret_mode='&retmode=xml'
217
+ ret_max='&retmax=10'
218
  ret_sort='&sort=relevance'
219
  return_url=ncbi_url+fetch_url+search_id+ret_type+ret_mode+ret_max+ret_sort
220
  pubmed_abstract_request = requests.get(return_url)
 
270
  default='sentence-transformers/all-mpnet-base-v1',
271
  label="Select any SBERT model for keyphrases from the list below"),
272
  gr.inputs.Slider(minimum=5, maximum=30, step=1, default=10, label="Max Keywords")],
273
+ outputs=gr.outputs.Dataframe(type="auto", label="dataframe",max_cols=None, overflow_row_behaviour="paginate"),
274
  theme="dark-peach",
275
  title="PubMed Abstract Retriever", description="Retrieves relevant PubMed abstracts for an online article which can be used as further references.",
276
  article= "This work is based on the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
277
  "\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."
278
+ "\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. "
279
  "\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>."
280
  "\t The default model names are provided which can be changed from the list of pretrained models. "
281
  "\t The value of keyphrases can be changed. The default value is 10, minimum is 5 and a maximum value of 30.")