Update README.md
This commit is contained in:
parent
3e62bba831
commit
2bdcc837e3
|
@ -18,12 +18,12 @@ import warnings
|
||||||
warnings.filterwarnings("ignore")
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
|
|
||||||
def set_seed(seed):
|
def random_state(seed):
|
||||||
torch.manual_seed(seed)
|
torch.manual_seed(seed)
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
torch.cuda.manual_seed_all(seed)
|
torch.cuda.manual_seed_all(seed)
|
||||||
|
|
||||||
set_seed(1234)
|
random_state(1234)
|
||||||
|
|
||||||
#Init models (make sure you init ONLY once if you integrate this to your code)
|
#Init models (make sure you init ONLY once if you integrate this to your code)
|
||||||
parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
|
parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
|
||||||
|
|
Loading…
Reference in New Issue