wjm41 / molplotly

add-on to plotly which show molecule images on mouseover!
Apache License 2.0
242 stars 25 forks source link

Streamlit Integration #34

Open Tonylac77 opened 5 months ago

Tonylac77 commented 5 months ago

Hi,

I was wondering if there was any way of integration molplotly into a streamlit app. This is some very code I have :

fig = visualize_chemical_space(library_to_visualise, method, fingerprint)
st.plotly_chart(fig)
app = molplotly.add_molecules(fig=fig, df=library_to_visualise, smiles_col='SMILES', title_col='ID')
app.run_server(mode='inline', port=8700, height=1000)

I guess this working out of the box was a long shot. If you have any ideas to make this work (my current idea was to create a button to link to the URL where the molplotly plot is hosted) I'd be grateful.

A lot of CADD/cheminformatics people seem to be using streamlit for some basic webapps. I think this would be an awesome feature to be able to add.