emmas96 commited on
Commit
f58b2a4
·
1 Parent(s): 9e6028d

temporarily disable display dti

Browse files
Files changed (1) hide show
  1. app.py +1 -35
app.py CHANGED
@@ -148,40 +148,6 @@ def retrieval():
148
  selected_encoder = st.selectbox(
149
  'Select encoder for protein target',('None', 'SeqVec', 'UniRep', 'ESM-1b', 'ProtT5')
150
  )
151
- if selected_encoder == 'SeqVec':
152
- from bio_embeddings.embed import SeqVecEmbedder
153
- encoder = SeqVecEmbedder()
154
- embeddings = encoder.embed_batch([sequence])
155
- for emb in embeddings:
156
- embedding = encoder.reduce_per_protein(emb)
157
- break
158
- elif selected_encoder == 'UniRep':
159
- from jax_unirep.utils import load_params
160
- params = load_params()
161
- from jax_unirep.featurize import get_reps
162
- embedding, h_final, c_final = get_reps([sequence])
163
- embedding = embedding.mean(axis=0)
164
- elif selected_encoder == 'ESM-1b':
165
- from bio_embeddings.embed import ESM1bEmbedder
166
- encoder = ESM1bEmbedder()
167
- embeddings = encoder.embed_batch([sequence])
168
- for emb in embeddings:
169
- embedding = encoder.reduce_per_protein(emb)
170
- break
171
- elif selected_encoder == 'ProtT5':
172
- from bio_embeddings.embed import ProtTransT5XLU50Embedder
173
- encoder = ProtTransT5XLU50Embedder()
174
- embeddings = encoder.embed_batch([sequence])
175
- for emb in embeddings:
176
- embedding = encoder.reduce_per_protein(emb)
177
- break
178
- else:
179
- st.write('No pre-trained version of HyperPCM is available for the chosen encoder.')
180
- embedding = None
181
- if embedding is not None:
182
- st.write(f'{selected_encoder} embedding')
183
- st.write(embedding)
184
-
185
 
186
  st.markdown('### Retrieval of top-5 drug coupound from ChEMBL:')
187
  col1, col2, col3, col4, col5 = st.columns(5)
@@ -282,7 +248,7 @@ def display_protein():
282
 
283
  page_names_to_func = {
284
  'About': about_page,
285
- 'Display DTI': display_dti,
286
  'Retrieve Top-k': retrieval
287
  }
288
 
 
148
  selected_encoder = st.selectbox(
149
  'Select encoder for protein target',('None', 'SeqVec', 'UniRep', 'ESM-1b', 'ProtT5')
150
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
  st.markdown('### Retrieval of top-5 drug coupound from ChEMBL:')
153
  col1, col2, col3, col4, col5 = st.columns(5)
 
248
 
249
  page_names_to_func = {
250
  'About': about_page,
251
+ #'Display DTI': display_dti,
252
  'Retrieve Top-k': retrieval
253
  }
254