sashdev commited on
Commit
4146933
·
verified ·
1 Parent(s): 9fc880b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- tokenizer = AutoTokenizer.from_pretrained(model_name)
 
 
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