import gradio as gr def update(smiles): x = ( f""" """ ) return f"""""" with gr.Blocks() as demo: gr.Markdown("# Smilesviewer") with gr.Column(): inp = gr.Textbox(label="SMILES string", placeholder="CCCC") out = gr.HTML() btn = gr.Button("Run") gr.Examples(["CCCCC", "OC(C(=O)O[C@H]1C[N+]2(CCCOC3=CC=CC=C3)CCC1CC2)(C1=CC=CS1)C1=CC=CS1"], inp, out, update) btn.click(fn=update, inputs=inp, outputs=out) demo.launch()