Spaces:
Sleeping
Sleeping
Cache TAPE-BERT loading
Browse files- hexviz/attention.py +1 -0
hexviz/attention.py
CHANGED
@@ -66,6 +66,7 @@ def get_protT5() -> Tuple[T5Tokenizer, T5EncoderModel]:
|
|
66 |
|
67 |
return tokenizer, model
|
68 |
|
|
|
69 |
def get_tape_bert() -> Tuple[TAPETokenizer, ProteinBertModel]:
|
70 |
tokenizer = TAPETokenizer()
|
71 |
model = ProteinBertModel.from_pretrained('bert-base', output_attentions=True)
|
|
|
66 |
|
67 |
return tokenizer, model
|
68 |
|
69 |
+
@st.cache
|
70 |
def get_tape_bert() -> Tuple[TAPETokenizer, ProteinBertModel]:
|
71 |
tokenizer = TAPETokenizer()
|
72 |
model = ProteinBertModel.from_pretrained('bert-base', output_attentions=True)
|