Andinda commited on
Commit
f1ea600
·
verified ·
1 Parent(s): 264c559

better classification

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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="dsfsi/PuoBERTa-NER")
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):