Spaces:
Sleeping
Sleeping
changing to use dsfsi
Browse files
app.py
CHANGED
@@ -16,10 +16,8 @@ Birinci Dünya Savaşı sırasında Osmanlı ordusunda görev yapan Atatürk, Ç
|
|
16 |
|
17 |
st.title("Demo for Sestwana NER Models")
|
18 |
|
19 |
-
model_list = ['https://huggingface.co/dsfsi/PuoBERTa'
|
20 |
-
'akdeniz27/convbert-base-turkish-cased-ner',
|
21 |
-
'xlm-roberta-large-finetuned-conll03-english',
|
22 |
-
'asahi417/tner-xlm-roberta-base-ontonotes5']
|
23 |
|
24 |
st.sidebar.header("Select NER Model")
|
25 |
model_checkpoint = st.sidebar.radio("", model_list)
|
@@ -50,7 +48,7 @@ elif input_method == "Write or Paste New Text":
|
|
50 |
def setModel(model_checkpoint, aggregation):
|
51 |
tokenizer = AutoTokenizer.from_pretrained("dsfsi/PuoBERTa-NER")
|
52 |
model = AutoModelForTokenClassification.from_pretrained("dsfsi/PuoBERTa-NER")
|
53 |
-
return pipeline(
|
54 |
|
55 |
@st.cache_resource
|
56 |
def get_html(html: str):
|
|
|
16 |
|
17 |
st.title("Demo for Sestwana NER Models")
|
18 |
|
19 |
+
model_list = ['https://huggingface.co/dsfsi/PuoBERTa'
|
20 |
+
'akdeniz27/convbert-base-turkish-cased-ner',]
|
|
|
|
|
21 |
|
22 |
st.sidebar.header("Select NER Model")
|
23 |
model_checkpoint = st.sidebar.radio("", model_list)
|
|
|
48 |
def setModel(model_checkpoint, aggregation):
|
49 |
tokenizer = AutoTokenizer.from_pretrained("dsfsi/PuoBERTa-NER")
|
50 |
model = AutoModelForTokenClassification.from_pretrained("dsfsi/PuoBERTa-NER")
|
51 |
+
return pipeline("token-classification", model="dsfsi/PuoBERTa-NER")
|
52 |
|
53 |
@st.cache_resource
|
54 |
def get_html(html: str):
|