Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,9 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
4 |
|
5 |
# Load the grammar correction model
|
6 |
model_name = "microsoft/deberta-v3-base"
|
7 |
-
|
|
|
|
|
8 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
9 |
|
10 |
# Function to correct grammar
|
|
|
4 |
|
5 |
# Load the grammar correction model
|
6 |
model_name = "microsoft/deberta-v3-base"
|
7 |
+
|
8 |
+
# Disable fast tokenization by setting `use_fast=False`
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=False)
|
10 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
11 |
|
12 |
# Function to correct grammar
|