Spaces:
Running
Running
better classification
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ elif input_method == "Write or Paste New Text":
|
|
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=
|
52 |
|
53 |
@st.cache_resource
|
54 |
def get_html(html: str):
|
|
|
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=model, tokenizer=tokenizer, aggregation_strategy=aggregation)
|
52 |
|
53 |
@st.cache_resource
|
54 |
def get_html(html: str):
|