emmas96 commited on
Commit
9574464
·
1 Parent(s): 818c6db

small bugs

Browse files
Files changed (1) hide show
  1. app.py +9 -10
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.write('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,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 the amino-acid sequence of the query protein target', value='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA', placeholder='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA')
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
- st.image('protein_encoder.png')
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.warning('Chosen encoder above...')
 
156
 
157
  if prot_embedding is not None:
158
  st.image('protein_encoder_done.png')
159
  st.success('Encoding complete.')
160
 
161
- if not drug_embedding or not prot_embedding:
162
- st.error('Waiting for both drug and target embeddings to be computed...')
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 the amino-acid sequence of the query protein target', value='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA', placeholder='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA')
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()