Oysiyl commited on
Commit
09af568
1 Parent(s): 168a9ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -4,8 +4,16 @@ from transformers import set_seed
4
  from transformers import AutoTokenizer
5
  from transformers import AutoModelForSeq2SeqLM
6
 
 
 
 
 
 
 
 
 
 
7
 
8
- set_seed(42)
9
  tokenizer = AutoTokenizer.from_pretrained("Oysiyl/elvish-translator-quenya-t5-base")
10
  model = AutoModelForSeq2SeqLM.from_pretrained("Oysiyl/elvish-translator-quenya-t5-base")
11
 
 
4
  from transformers import AutoTokenizer
5
  from transformers import AutoModelForSeq2SeqLM
6
 
7
+ import torch
8
+ import random
9
+ import numpy as np
10
+
11
+ seed = 42
12
+ random.seed(seed)
13
+ np.random.seed(seed)
14
+ torch.manual_seed(seed)
15
+ set_seed(seed)
16
 
 
17
  tokenizer = AutoTokenizer.from_pretrained("Oysiyl/elvish-translator-quenya-t5-base")
18
  model = AutoModelForSeq2SeqLM.from_pretrained("Oysiyl/elvish-translator-quenya-t5-base")
19