CarolXia commited on
Commit
c811912
·
1 Parent(s): 0dd2059

Try deberta v2 as tokenizer

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ model_name = "CarolXia/pii-kd-deberta-v2"
51
  model = DebertaV2ForTokenClassification.from_pretrained(model_name, token=st.secrets["HUGGINGFACE_TOKEN"])
52
  # Try quantization instead
53
  # model = AutoModelForTokenClassification.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
54
- tokenizer = DebertaV2Tokenizer.from_pretrained(model_name, token=st.secrets["HUGGINGFACE_TOKEN"])
55
  recognizer = pipeline("ner", model=model, tokenizer=tokenizer)
56
  # model_name = "urchade/gliner_multi_pii-v1"
57
  # model = GLiNER.from_pretrained(model_name)
 
51
  model = DebertaV2ForTokenClassification.from_pretrained(model_name, token=st.secrets["HUGGINGFACE_TOKEN"])
52
  # Try quantization instead
53
  # model = AutoModelForTokenClassification.from_pretrained(model_name, device_map="auto", load_in_8bit=True)
54
+ tokenizer = DebertaV2Tokenizer.from_pretrained("microsoft/mdeberta-v3-base", token=st.secrets["HUGGINGFACE_TOKEN"])
55
  recognizer = pipeline("ner", model=model, tokenizer=tokenizer)
56
  # model_name = "urchade/gliner_multi_pii-v1"
57
  # model = GLiNER.from_pretrained(model_name)