Spaces:
Sleeping
Sleeping
Try deberta v2 as tokenizer
Browse files
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(
|
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)
|