File size: 578 Bytes
8b49f1d
 
 
 
 
 
 
84461f3
 
 
 
 
 
 
 
3e3b943
 
84461f3
 
8b49f1d
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

import gradio as gr
from gradio_molecule2d import molecule2d


example = molecule2d().example_value()

#demo = gr.Interface(
#    lambda x:x,
#    molecule2d(),  # interactive version of your component
#    molecule2d(),  # static version of your component
#    # examples=[[example]],  # uncomment this line to view the "example version" of your component
#)

with gr.Blocks() as demo:
    inp = molecule2d(label="SMILES Input")
    out = molecule2d(label="Output")
    btn = gr.Button("Run")
    btn.click(lambda x:x, inp, out)


if __name__ == "__main__":
    demo.launch()