Spaces:
Running
Running
Update app.py
Browse files
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')))
|