Update README.md
Browse files
README.md
CHANGED
@@ -42,7 +42,7 @@ tokenizer_for_restoring = T5Tokenizer.from_pretrained('bond005/ruT5-ASR-large')
|
|
42 |
model_for_restoring = T5ForConditionalGeneration.from_pretrained('bond005/ruT5-ASR-large')
|
43 |
config_for_restoring = GenerationConfig.from_pretrained('bond005/ruT5-ASR-large')
|
44 |
if torch.cuda.is_available():
|
45 |
-
model_for_restoring =
|
46 |
|
47 |
input_examples = [
|
48 |
'краеугольным камнем любышь алгоритных машиного обучения является преждес его ' \
|
@@ -57,8 +57,8 @@ input_examples = [
|
|
57 |
]
|
58 |
|
59 |
for idx, val in enumerate(input_examples):
|
60 |
-
restored = restore_text(val,
|
61 |
-
config_for_restoring,
|
62 |
print('==========')
|
63 |
print(f'Example {idx + 1}')
|
64 |
print('==========')
|
|
|
42 |
model_for_restoring = T5ForConditionalGeneration.from_pretrained('bond005/ruT5-ASR-large')
|
43 |
config_for_restoring = GenerationConfig.from_pretrained('bond005/ruT5-ASR-large')
|
44 |
if torch.cuda.is_available():
|
45 |
+
model_for_restoring = model_for_restoring.cuda()
|
46 |
|
47 |
input_examples = [
|
48 |
'краеугольным камнем любышь алгоритных машиного обучения является преждес его ' \
|
|
|
57 |
]
|
58 |
|
59 |
for idx, val in enumerate(input_examples):
|
60 |
+
restored = restore_text(val, tokenizer_for_restoring,
|
61 |
+
config_for_restoring, model_for_restoring)
|
62 |
print('==========')
|
63 |
print(f'Example {idx + 1}')
|
64 |
print('==========')
|