SaviAnna commited on
Commit
b7882eb
1 Parent(s): 9b52475

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -22,6 +22,11 @@ model = GPT2LMHeadModel.from_pretrained(
22
  output_attentions = False,
23
  output_hidden_states = False,
24
  )
 
 
 
 
 
25
 
26
  # # Вешаем сохраненные веса на нашу модель
27
  model.load_state_dict(torch.load('model_history.pt',map_location=torch.device('cpu')))
 
22
  output_attentions = False,
23
  output_hidden_states = False,
24
  )
25
+ tokenizer = GPT2Tokenizer.from_pretrained(
26
+ 'sberbank-ai/rugpt3small_based_on_gpt2',
27
+ output_attentions = False,
28
+ output_hidden_states = False,
29
+ )
30
 
31
  # # Вешаем сохраненные веса на нашу модель
32
  model.load_state_dict(torch.load('model_history.pt',map_location=torch.device('cpu')))