Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,15 +16,15 @@ st.sidebar.image(image, caption=None, width=None, use_column_width=None, clamp=F
|
|
16 |
|
17 |
@st.cache_resource
|
18 |
def load_model(version,text):
|
19 |
-
if version == "NERmemBERT1-3entities-base:
|
20 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-base-3entities', tokenizer='CATIE-AQ/NERmembert-base-3entities', aggregation_strategy="simple")
|
21 |
result = ner(text)
|
22 |
return result
|
23 |
-
if version == "NERmemBERT2-3entities-base:
|
24 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert2-3entities', tokenizer='CATIE-AQ/NERmembert2-3entities', aggregation_strategy="simple")
|
25 |
result = ner(text)
|
26 |
return result
|
27 |
-
if version == "NERmemBERTa-3entities-base:
|
28 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmemberta-3entities', tokenizer='CATIE-AQ/NERmemberta-3entities', aggregation_strategy="simple")
|
29 |
result = ner(text)
|
30 |
return result
|
@@ -32,15 +32,15 @@ def load_model(version,text):
|
|
32 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-large-3entities', tokenizer='CATIE-AQ/NERmembert-large-3entities', aggregation_strategy="simple")
|
33 |
result = ner(text)
|
34 |
return result
|
35 |
-
if version == "NERmemBERT1-4entities-base:
|
36 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-base-4entities', tokenizer='CATIE-AQ/NERmembert-base-4entities', aggregation_strategy="simple")
|
37 |
result = ner(text)
|
38 |
return result
|
39 |
-
if version == "NERmemBERT2-4entities-base:
|
40 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert2-4entities', tokenizer='CATIE-AQ/NERmembert2-4entities', aggregation_strategy="simple")
|
41 |
result = ner(text)
|
42 |
return result
|
43 |
-
if version == "NERmemBERTa-4entities-base:
|
44 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmemberta-4entities', tokenizer='CATIE-AQ/NERmemberta-4entities', aggregation_strategy="simple")
|
45 |
result = ner(text)
|
46 |
return result
|
|
|
16 |
|
17 |
@st.cache_resource
|
18 |
def load_model(version,text):
|
19 |
+
if version == "NERmemBERT1-3entities-base":
|
20 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-base-3entities', tokenizer='CATIE-AQ/NERmembert-base-3entities', aggregation_strategy="simple")
|
21 |
result = ner(text)
|
22 |
return result
|
23 |
+
if version == "NERmemBERT2-3entities-base":
|
24 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert2-3entities', tokenizer='CATIE-AQ/NERmembert2-3entities', aggregation_strategy="simple")
|
25 |
result = ner(text)
|
26 |
return result
|
27 |
+
if version == "NERmemBERTa-3entities-base":
|
28 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmemberta-3entities', tokenizer='CATIE-AQ/NERmemberta-3entities', aggregation_strategy="simple")
|
29 |
result = ner(text)
|
30 |
return result
|
|
|
32 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-large-3entities', tokenizer='CATIE-AQ/NERmembert-large-3entities', aggregation_strategy="simple")
|
33 |
result = ner(text)
|
34 |
return result
|
35 |
+
if version == "NERmemBERT1-4entities-base":
|
36 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert-base-4entities', tokenizer='CATIE-AQ/NERmembert-base-4entities', aggregation_strategy="simple")
|
37 |
result = ner(text)
|
38 |
return result
|
39 |
+
if version == "NERmemBERT2-4entities-base":
|
40 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmembert2-4entities', tokenizer='CATIE-AQ/NERmembert2-4entities', aggregation_strategy="simple")
|
41 |
result = ner(text)
|
42 |
return result
|
43 |
+
if version == "NERmemBERTa-4entities-base":
|
44 |
ner = pipeline('token-classification', model='CATIE-AQ/NERmemberta-4entities', tokenizer='CATIE-AQ/NERmemberta-4entities', aggregation_strategy="simple")
|
45 |
result = ner(text)
|
46 |
return result
|