NoaiGPT commited on
Commit
73796a8
1 Parent(s): 1ad5767
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -209,8 +209,8 @@ classifier_model = AutoModelForSequenceClassification.from_pretrained(classifier
209
 
210
  # Initialize grammar correction model and tokenizer
211
  grammar_model_name = "NoaiGPT/grammarly-coedit-large"
212
- grammar_tokenizer = AutoTokenizer.from_pretrained(grammar_model_name)
213
- grammar_model = T5ForConditionalGeneration.from_pretrained(grammar_model_name).to(device)
214
 
215
  # Initialize sentence splitter
216
  splitter = SentenceSplitter(language='en')
 
209
 
210
  # Initialize grammar correction model and tokenizer
211
  grammar_model_name = "NoaiGPT/grammarly-coedit-large"
212
+ grammar_tokenizer = AutoTokenizer.from_pretrained(grammar_model_name,use_auth_token=hf_token)
213
+ grammar_model = T5ForConditionalGeneration.from_pretrained(grammar_model_name, use_auth_token=hf_token).to(device)
214
 
215
  # Initialize sentence splitter
216
  splitter = SentenceSplitter(language='en')