|
|
|
import time |
|
|
|
import gradio as gr |
|
|
|
from gradio_molecule3d import Molecule3D |
|
|
|
|
|
def predict (input_sequence, input_ligand): |
|
start_time = time.time() |
|
|
|
|
|
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") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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() |
|
|