nxmwxm commited on
Commit
889b6e8
·
verified ·
1 Parent(s): 3dd429a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -5,16 +5,6 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
5
 
6
  model_repo_path = 'nxmwxm/correct_answer'
7
 
8
- # Load the tokenizer
9
- tokenizer = AutoTokenizer.from_pretrained(model_repo_path)
10
-
11
- # Define special tokens
12
- special_tokens_dict = {'additional_special_tokens': ['<extra_id_99>']}
13
- num_added_toks = tokenizer.add_special_tokens(special_tokens_dict)
14
-
15
- # Load the model and resize token embeddings
16
- model = AutoModelForSeq2SeqLM.from_pretrained(model_repo_path)
17
- model.resize_token_embeddings(len(tokenizer))
18
 
19
 
20
  # Load the pipeline with your model and tokenizer
 
5
 
6
  model_repo_path = 'nxmwxm/correct_answer'
7
 
 
 
 
 
 
 
 
 
 
 
8
 
9
 
10
  # Load the pipeline with your model and tokenizer