pritamdeka
commited on
Commit
β’
b1dc37d
1
Parent(s):
2d8275e
Update app.py
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ igen=gr.Interface(keyphrase_generator,
|
|
124 |
'sentence-transformers/sentence-t5-large',
|
125 |
'sentence-transformers/sentence-t5-base'],
|
126 |
type="value",
|
127 |
-
|
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',
|
@@ -141,33 +141,33 @@ igen=gr.Interface(keyphrase_generator,
|
|
141 |
'sentence-transformers/paraphrase-MiniLM-L3-v2',
|
142 |
'sentence-transformers/all-MiniLM-L6-v2'],
|
143 |
type="value",
|
144 |
-
|
145 |
label="Select any SBERT model for keyphrases from the list below"),
|
146 |
-
gr.components.Slider(minimum=5, maximum=30, step=1,
|
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.
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
article= "The work is based on a part of the paper provided <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>here</a>."
|
172 |
"\t It uses the TextRank algorithm with <a href=https://www.sbert.net/>SBERT</a> to first find the top ranked sentences and then extracts the keyphrases"
|
173 |
"\t from those sentences using <a href = https://allenai.github.io/scispacy/>scispaCy</a> and SBERT."
|
|
|
124 |
'sentence-transformers/sentence-t5-large',
|
125 |
'sentence-transformers/sentence-t5-base'],
|
126 |
type="value",
|
127 |
+
value='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',
|
|
|
141 |
'sentence-transformers/paraphrase-MiniLM-L3-v2',
|
142 |
'sentence-transformers/all-MiniLM-L6-v2'],
|
143 |
type="value",
|
144 |
+
value='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, value=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. ",
|
150 |
+
examples=[
|
151 |
+
["https://www.cancer.news/2021-12-22-mrna-vaccines-weaken-immune-system-cause-cancer.html",
|
152 |
+
'sentence-transformers/all-mpnet-base-v1',
|
153 |
+
'sentence-transformers/paraphrase-MiniLM-L12-v2',
|
154 |
+
10],
|
155 |
|
156 |
+
["https://www.cancer.news/2022-02-04-doctors-testifying-covid-vaccines-causing-cancer-aids.html#",
|
157 |
+
'sentence-transformers/all-mpnet-base-v1',
|
158 |
+
'sentence-transformers/all-mpnet-base-v1',
|
159 |
+
12],
|
160 |
|
161 |
+
["https://www.medicalnewstoday.com/articles/alzheimers-addressing-sleep-disturbance-may-alleviate-symptoms",
|
162 |
+
'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
|
163 |
+
'sentence-transformers/all-mpnet-base-v1',
|
164 |
+
10],
|
165 |
|
166 |
+
["https://www.medicalnewstoday.com/articles/omicron-what-do-we-know-about-the-stealth-variant",
|
167 |
+
'pritamdeka/S-Biomed-Roberta-snli-multinli-stsb',
|
168 |
+
'sentence-transformers/all-mpnet-base-v1',
|
169 |
+
15]
|
170 |
+
],
|
171 |
article= "The work is based on a part of the paper provided <a href=https://dl.acm.org/doi/10.1145/3487664.3487701>here</a>."
|
172 |
"\t It uses the TextRank algorithm with <a href=https://www.sbert.net/>SBERT</a> to first find the top ranked sentences and then extracts the keyphrases"
|
173 |
"\t from those sentences using <a href = https://allenai.github.io/scispacy/>scispaCy</a> and SBERT."
|