pritamdeka commited on
Commit
5354eb3
Β·
1 Parent(s): db3b8b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -210,7 +210,7 @@ def keyphrase_generator(article_link, model_1, model_2, max_num_keywords, model_
210
  search_id='&id='+all_search_ids
211
  ret_type='&rettype=text'
212
  ret_mode='&retmode=xml'
213
- ret_max='&retmax=20'
214
  ret_sort='&sort=relevance'
215
  return_url=ncbi_url+fetch_url+search_id+ret_type+ret_mode+ret_max+ret_sort
216
  pubmed_abstract_request = requests.get(return_url)
@@ -271,12 +271,12 @@ igen_pubmed = gr.Interface(keyphrase_generator,
271
  type="value",
272
  default='cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
273
  label="Select any SapBERT model for clustering from the list below")],
274
- outputs=gr.outputs.Dataframe(type="auto", label="dataframe",max_rows=10, max_cols=None, overflow_row_behaviour="paginate"),
275
  theme="peach",
276
  title="Scientific Article Keyphrase Generator", description="Generates the keyphrases from an article which best describes the article.",
277
  article= "The work is based the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
278
  "\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."
279
- "\t The application then uses a <a href=https://arxiv.org/abs/2010.11784>UMLS based Bert model</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. The UMLS Bert models can be chosen from the list provided. "
280
  "\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>."
281
  "\t The default model names are provided which can be changed from the list of pretrained models. "
282
  "\t The value of keyphrases can be changed. The default value is 10, minimum is 5 and a maximum value of 30.")
 
210
  search_id='&id='+all_search_ids
211
  ret_type='&rettype=text'
212
  ret_mode='&retmode=xml'
213
+ ret_max='&retmax=10'
214
  ret_sort='&sort=relevance'
215
  return_url=ncbi_url+fetch_url+search_id+ret_type+ret_mode+ret_max+ret_sort
216
  pubmed_abstract_request = requests.get(return_url)
 
271
  type="value",
272
  default='cambridgeltl/SapBERT-from-PubMedBERT-fulltext',
273
  label="Select any SapBERT model for clustering from the list below")],
274
+ outputs=gr.outputs.Dataframe(type="auto", label="dataframe",max_cols=None, overflow_row_behaviour="paginate"),
275
  theme="peach",
276
  title="Scientific Article Keyphrase Generator", description="Generates the keyphrases from an article which best describes the article.",
277
  article= "The work is based the paper <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>provided here</a>."
278
  "\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."
279
+ "\t The application then uses a <a href=https://arxiv.org/abs/2010.11784>UMLS based Bert model</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 UMLS Bert models can be chosen from the list provided. "
280
  "\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>."
281
  "\t The default model names are provided which can be changed from the list of pretrained models. "
282
  "\t The value of keyphrases can be changed. The default value is 10, minimum is 5 and a maximum value of 30.")