Spaces:
Sleeping
Sleeping
Krish Patel
commited on
Commit
·
9afc7df
1
Parent(s):
2f55336
Testing1
Browse files
final.py
CHANGED
|
@@ -14,7 +14,9 @@ nlp = spacy.load("en_core_web_sm")
|
|
| 14 |
# Load the trained ML model
|
| 15 |
model_path = "./results/checkpoint-753" # Replace with the actual path to your model
|
| 16 |
# tokenizer = AutoTokenizer.from_pretrained('microsoft/deberta-v3-small')
|
| 17 |
-
tokenizer = AutoTokenizer.from_pretrained('microsoft/deberta-v3-small', use_fast=False)
|
|
|
|
|
|
|
| 18 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 19 |
model.eval()
|
| 20 |
|
|
|
|
| 14 |
# Load the trained ML model
|
| 15 |
model_path = "./results/checkpoint-753" # Replace with the actual path to your model
|
| 16 |
# tokenizer = AutoTokenizer.from_pretrained('microsoft/deberta-v3-small')
|
| 17 |
+
# tokenizer = AutoTokenizer.from_pretrained('microsoft/deberta-v3-small', use_fast=False)
|
| 18 |
+
from transformers import DebertaV2Tokenizer
|
| 19 |
+
tokenizer = DebertaV2Tokenizer.from_pretrained('microsoft/deberta-v3-small')
|
| 20 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 21 |
model.eval()
|
| 22 |
|