Spaces:
Sleeping
Sleeping
| import time | |
| import gradio as gr | |
| from gradio_molecule3d import Molecule3D | |
| def predict (input_sequence, input_ligand): | |
| start_time = time.time() | |
| # Do inference here | |
| # return an output directory | |
| end_time = time.time() | |
| run_time = end_time - start_time | |
| return None, run_time | |
| with gr.Blocks() as app: | |
| gr.Markdown("# Template for inference") | |
| gr.Markdown("Title, description, and other information about the model") | |
| with gr.Row(): | |
| input_sequence = gr.Textbox(lines=3, label="Input sequence") | |
| input_ligand = gr.Textbox(lines=3, label="Input ligand SMILES") | |
| # define any options here | |
| # the final for inference should be the default options | |
| # slider_option = gr.Slider(0,10, label="Slider Option") | |
| # checkbox_option = gr.Checkbox(label="Checkbox Option") | |
| # dropdown_option = gr.Dropdown(["Option 1", "Option 2", "Option 3"], label="Radio Option") | |
| btn = gr.Button(label="Run Inference") | |
| out = gr.Molecule3D() | |
| run_time = gr.Textbox(label="Runtime") | |
| btn.click(predict, inputs=[input_sequence, input_ligand], outputs=[out, run_time]) | |
| app.launch() | |