File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,16 @@ def _setup_seqvec(self):
63
63
seqvec_weights_fn = f'{ seqvec_dir } /uniref50_v2/weights.hdf5'
64
64
if not (os .path .isfile (seqvec_conf_fn ) and os .path .isfile (seqvec_weights_fn )):
65
65
print ('SeqVec weights are not available, downloading from the remote source (this\' ll happen only once)...' )
66
- seqvec_zip_fn = get_file (f'{ self ._path } /weights/seqvec.zip' , 'https://rostlab.org/~deepppi/seqvec.zip' )
67
- archive = ZipFile (seqvec_zip_fn )
68
- archive .extract ('uniref50_v2/options.json' , seqvec_dir )
69
- archive .extract ('uniref50_v2/weights.hdf5' , seqvec_dir )
66
+ urls = ['https://rostlab.org/~deepppi/seqvec.zip' , 'https://lbs.cent.uw.edu.pl/static/files/seqvec.zip' ]
67
+ for url in urls :
68
+ try :
69
+ seqvec_zip_fn = get_file (f'{ self ._path } /weights/seqvec.zip' , url )
70
+ archive = ZipFile (seqvec_zip_fn )
71
+ archive .extract ('uniref50_v2/options.json' , seqvec_dir )
72
+ archive .extract ('uniref50_v2/weights.hdf5' , seqvec_dir )
73
+ break
74
+ except :
75
+ print (f'Could not download SeqVec weights from url: { url } ' )
70
76
if self .use_gpu :
71
77
return SeqVec (model_dir = f'{ seqvec_dir } /uniref50_v2' , cuda_device = 0 , tokens_per_batch = 8000 )
72
78
else :
You can’t perform that action at this time.
0 commit comments