emmas96 commited on
Commit
6146fc6
·
1 Parent(s): 9291076

add download to pre-loaded results

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -160,6 +160,10 @@ def retrieval():
160
  mol = Chem.MolFromSmiles(results.loc[j + 5*i, 'SMILES'])
161
  mol_img = Chem.Draw.MolToImage(mol)
162
  st.image(mol_img, caption=f"{results.loc[j + 5*i, 'Prediction']:.2f}")
 
 
 
 
163
 
164
  elif query_embedding is not None:
165
  st.markdown('### Inference')
 
160
  mol = Chem.MolFromSmiles(results.loc[j + 5*i, 'SMILES'])
161
  mol_img = Chem.Draw.MolToImage(mol)
162
  st.image(mol_img, caption=f"{results.loc[j + 5*i, 'Prediction']:.2f}")
163
+
164
+ st.download_button('Download retrieved drug compounds.', convert_df(results.head(selected_k)), file_name='retrieved_drugs.csv')
165
+
166
+ st.markdown('## TMP title')
167
 
168
  elif query_embedding is not None:
169
  st.markdown('### Inference')