small bugs
Browse files
app.py
CHANGED
@@ -45,13 +45,13 @@ def about_page():
|
|
45 |
"""
|
46 |
)
|
47 |
|
48 |
-
st.image('hyper-dti.png')
|
49 |
|
50 |
|
51 |
def predict_dti():
|
52 |
st.markdown('## Predict drug-target interaction')
|
53 |
|
54 |
-
st.
|
55 |
|
56 |
col1, col2 = st.columns(2)
|
57 |
|
@@ -108,7 +108,7 @@ def predict_dti():
|
|
108 |
prot_col1, prot_col2 = st.columns(2)
|
109 |
|
110 |
with prot_col1:
|
111 |
-
sequence = st.text_input('Enter
|
112 |
|
113 |
if sequence:
|
114 |
st.error('Visualization comming soon...')
|
@@ -117,7 +117,7 @@ def predict_dti():
|
|
117 |
selected_encoder = st.selectbox(
|
118 |
'Select encoder for protein target',('None', 'SeqVec', 'UniRep', 'ESM-1b', 'ProtT5')
|
119 |
)
|
120 |
-
|
121 |
if sequence:
|
122 |
if selected_encoder == 'SeqVec':
|
123 |
with st.spinner('Encoding in progress...'):
|
@@ -152,14 +152,15 @@ def predict_dti():
|
|
152 |
break
|
153 |
else:
|
154 |
prot_embedding = None
|
155 |
-
st.
|
|
|
156 |
|
157 |
if prot_embedding is not None:
|
158 |
st.image('protein_encoder_done.png')
|
159 |
st.success('Encoding complete.')
|
160 |
|
161 |
-
if
|
162 |
-
st.
|
163 |
else:
|
164 |
st.warning('In the future inference will be run with HyperPCM on the given drug compound and protein target...')
|
165 |
|
@@ -170,7 +171,7 @@ def retrieval():
|
|
170 |
st.write('In the furute this page will retrieve the top-k drug compounds that are predicted to have the highest activity toward the given protein target from either the Lenselink or Davis datasets.')
|
171 |
|
172 |
st.markdown('### Target')
|
173 |
-
sequence = st.text_input('Enter
|
174 |
|
175 |
if sequence:
|
176 |
col1, col2 = st.columns(2)
|
@@ -178,8 +179,6 @@ def retrieval():
|
|
178 |
st.error('Visualization coming soon...')
|
179 |
|
180 |
with col2:
|
181 |
-
st.image('protein_encoder.png')
|
182 |
-
|
183 |
with st.spinner('Encoding in progress...'):
|
184 |
from bio_embeddings.embed import SeqVecEmbedder
|
185 |
encoder = SeqVecEmbedder()
|
|
|
45 |
"""
|
46 |
)
|
47 |
|
48 |
+
st.image('hyper-dti.png', caption='Overview of HyperPCM architecture.')
|
49 |
|
50 |
|
51 |
def predict_dti():
|
52 |
st.markdown('## Predict drug-target interaction')
|
53 |
|
54 |
+
st.warning('In the future this page will display the predicted interaction betweek the given drug compounds and protein target by the HyperPCM mdoel.')
|
55 |
|
56 |
col1, col2 = st.columns(2)
|
57 |
|
|
|
108 |
prot_col1, prot_col2 = st.columns(2)
|
109 |
|
110 |
with prot_col1:
|
111 |
+
sequence = st.text_input('Enter query amino-acid sequence', value='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA', placeholder='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA')
|
112 |
|
113 |
if sequence:
|
114 |
st.error('Visualization comming soon...')
|
|
|
117 |
selected_encoder = st.selectbox(
|
118 |
'Select encoder for protein target',('None', 'SeqVec', 'UniRep', 'ESM-1b', 'ProtT5')
|
119 |
)
|
120 |
+
|
121 |
if sequence:
|
122 |
if selected_encoder == 'SeqVec':
|
123 |
with st.spinner('Encoding in progress...'):
|
|
|
152 |
break
|
153 |
else:
|
154 |
prot_embedding = None
|
155 |
+
st.image('protein_encoder.png')
|
156 |
+
st.warning('Choose encoder above...')
|
157 |
|
158 |
if prot_embedding is not None:
|
159 |
st.image('protein_encoder_done.png')
|
160 |
st.success('Encoding complete.')
|
161 |
|
162 |
+
if drug_embedding is None or prot_embedding is None:
|
163 |
+
st.warning('Waiting for both drug and target embeddings to be computed...')
|
164 |
else:
|
165 |
st.warning('In the future inference will be run with HyperPCM on the given drug compound and protein target...')
|
166 |
|
|
|
171 |
st.write('In the furute this page will retrieve the top-k drug compounds that are predicted to have the highest activity toward the given protein target from either the Lenselink or Davis datasets.')
|
172 |
|
173 |
st.markdown('### Target')
|
174 |
+
sequence = st.text_input('Enter query amino-acid sequence', value='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA', placeholder='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA')
|
175 |
|
176 |
if sequence:
|
177 |
col1, col2 = st.columns(2)
|
|
|
179 |
st.error('Visualization coming soon...')
|
180 |
|
181 |
with col2:
|
|
|
|
|
182 |
with st.spinner('Encoding in progress...'):
|
183 |
from bio_embeddings.embed import SeqVecEmbedder
|
184 |
encoder = SeqVecEmbedder()
|