change to internal default CDDD model
Browse files
app.py
CHANGED
|
@@ -62,11 +62,8 @@ def display_dti():
|
|
| 62 |
)
|
| 63 |
if selected_encoder == 'CDDD':
|
| 64 |
from cddd.inference import InferenceModel
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
REPO_ID = "emmas96/hyperpcm"
|
| 68 |
-
checkpoint_path = hf_hub_download(REPO_ID, CDDD_MODEL_DIR)
|
| 69 |
-
cddd_model = InferenceModel(checkpoint_path)
|
| 70 |
embedding = cddd_model.seq_to_emb([smiles])
|
| 71 |
elif selected_encoder == 'MolBERT':
|
| 72 |
from molbert.utils.featurizer.molbert_featurizer import MolBertFeaturizer
|
|
@@ -122,7 +119,7 @@ def display_dti():
|
|
| 122 |
st.write(embedding)
|
| 123 |
|
| 124 |
|
| 125 |
-
|
| 126 |
"""
|
| 127 |
sequence = st.text_input("Enter the amino-acid sequence of the query protein target", value="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA", placeholder="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA")
|
| 128 |
|
|
|
|
| 62 |
)
|
| 63 |
if selected_encoder == 'CDDD':
|
| 64 |
from cddd.inference import InferenceModel
|
| 65 |
+
CDDD_MODEL_DIR = 'src/encoders/cddd'
|
| 66 |
+
cddd_model = InferenceModel(CDDD_MODEL_DIR)
|
|
|
|
|
|
|
|
|
|
| 67 |
embedding = cddd_model.seq_to_emb([smiles])
|
| 68 |
elif selected_encoder == 'MolBERT':
|
| 69 |
from molbert.utils.featurizer.molbert_featurizer import MolBertFeaturizer
|
|
|
|
| 119 |
st.write(embedding)
|
| 120 |
|
| 121 |
|
| 122 |
+
def display_protein():
|
| 123 |
"""
|
| 124 |
sequence = st.text_input("Enter the amino-acid sequence of the query protein target", value="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA", placeholder="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA")
|
| 125 |
|