Spaces:
Runtime error
Runtime error
Update input_sequence.py
Browse files- input_sequence.py +2 -2
input_sequence.py
CHANGED
|
@@ -248,7 +248,7 @@ def load_seq_model():
|
|
| 248 |
|
| 249 |
@st.cache_resource(show_spinner="Memuat DNABERT-2")
|
| 250 |
def load_dnabert():
|
| 251 |
-
from
|
| 252 |
from huggingface_hub import snapshot_download
|
| 253 |
import os
|
| 254 |
|
|
@@ -260,7 +260,7 @@ def load_dnabert():
|
|
| 260 |
)
|
| 261 |
|
| 262 |
tokenizer = AutoTokenizer.from_pretrained(local_dir, trust_remote_code=True)
|
| 263 |
-
dnabert =
|
| 264 |
dnabert.eval()
|
| 265 |
for p in dnabert.parameters():
|
| 266 |
p.requires_grad = False
|
|
|
|
| 248 |
|
| 249 |
@st.cache_resource(show_spinner="Memuat DNABERT-2")
|
| 250 |
def load_dnabert():
|
| 251 |
+
from multimolecule import AutoTokenizer, DnaBert2Model
|
| 252 |
from huggingface_hub import snapshot_download
|
| 253 |
import os
|
| 254 |
|
|
|
|
| 260 |
)
|
| 261 |
|
| 262 |
tokenizer = AutoTokenizer.from_pretrained(local_dir, trust_remote_code=True)
|
| 263 |
+
dnabert = DnaBert2Model.from_pretrained(local_dir, trust_remote_code=True)
|
| 264 |
dnabert.eval()
|
| 265 |
for p in dnabert.parameters():
|
| 266 |
p.requires_grad = False
|