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

changing to use dsfsi

Browse files
Files changed (1) hide show
  1. app.py +3 -5
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('ner', model=model, tokenizer=tokenizer, aggregation_strategy=aggregation)
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):