pritamdeka
commited on
Commit
·
c88fcb6
1
Parent(s):
bd35a11
Update app.py
Browse files
app.py
CHANGED
@@ -110,8 +110,8 @@ def keyphrase_generator(article_link, model_1, model_2, max_num_keywords):
|
|
110 |
return keywords
|
111 |
|
112 |
igen=gr.Interface(keyphrase_generator,
|
113 |
-
inputs=[gr.
|
114 |
-
gr.
|
115 |
'sentence-transformers/all-mpnet-base-v1',
|
116 |
'sentence-transformers/all-distilroberta-v1',
|
117 |
'sentence-transformers/gtr-t5-large',
|
@@ -126,7 +126,7 @@ igen=gr.Interface(keyphrase_generator,
|
|
126 |
type="value",
|
127 |
default='pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
|
128 |
label="Select any SBERT model for TextRank from the list below"),
|
129 |
-
gr.
|
130 |
'sentence-transformers/all-mpnet-base-v1',
|
131 |
'sentence-transformers/paraphrase-distilroberta-base-v1',
|
132 |
'sentence-transformers/paraphrase-xlm-r-multilingual-v1',
|
@@ -143,7 +143,7 @@ igen=gr.Interface(keyphrase_generator,
|
|
143 |
type="value",
|
144 |
default='sentence-transformers/all-mpnet-base-v1',
|
145 |
label="Select any SBERT model for keyphrases from the list below"),
|
146 |
-
gr.
|
147 |
outputs=gr.outputs.Textbox(type="text", label="Output"), theme="peach",
|
148 |
title="Health Article Keyphrase Generator",
|
149 |
description="Generates the keyphrases from an online health article which best describes the article. Examples are provided below for demo purposes. Choose any one example to see the results. ",
|
|
|
110 |
return keywords
|
111 |
|
112 |
igen=gr.Interface(keyphrase_generator,
|
113 |
+
inputs=[gr.components.Textbox(lines=1, placeholder="Provide an online health article web link here",default="", label="Article web link"),
|
114 |
+
gr.components.Dropdown(choices=['sentence-transformers/all-mpnet-base-v2',
|
115 |
'sentence-transformers/all-mpnet-base-v1',
|
116 |
'sentence-transformers/all-distilroberta-v1',
|
117 |
'sentence-transformers/gtr-t5-large',
|
|
|
126 |
type="value",
|
127 |
default='pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
|
128 |
label="Select any SBERT model for TextRank from the list below"),
|
129 |
+
gr.components.Dropdown(choices=['sentence-transformers/paraphrase-mpnet-base-v2',
|
130 |
'sentence-transformers/all-mpnet-base-v1',
|
131 |
'sentence-transformers/paraphrase-distilroberta-base-v1',
|
132 |
'sentence-transformers/paraphrase-xlm-r-multilingual-v1',
|
|
|
143 |
type="value",
|
144 |
default='sentence-transformers/all-mpnet-base-v1',
|
145 |
label="Select any SBERT model for keyphrases from the list below"),
|
146 |
+
gr.components.Slider(minimum=5, maximum=30, step=1, default=10, label="Max Keywords")],
|
147 |
outputs=gr.outputs.Textbox(type="text", label="Output"), theme="peach",
|
148 |
title="Health Article Keyphrase Generator",
|
149 |
description="Generates the keyphrases from an online health article which best describes the article. Examples are provided below for demo purposes. Choose any one example to see the results. ",
|