Spaces:
Sleeping
Sleeping
simonduerr
commited on
Commit
•
4853a01
1
Parent(s):
f354223
Update inference_app.py
Browse files- inference_app.py +10 -3
inference_app.py
CHANGED
@@ -8,10 +8,10 @@ from gradio_molecule3d import Molecule3D
|
|
8 |
|
9 |
|
10 |
|
11 |
-
def predict (input_sequence, input_ligand):
|
12 |
start_time = time.time()
|
13 |
# Do inference here
|
14 |
-
# return an output
|
15 |
end_time = time.time()
|
16 |
run_time = end_time - start_time
|
17 |
return "test_out.pdb", run_time
|
@@ -57,12 +57,19 @@ with gr.Blocks() as app:
|
|
57 |
"resname": "UNK",
|
58 |
"style": "stick",
|
59 |
"color": "greenCarbon",
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
|
|
61 |
]
|
62 |
|
63 |
out = Molecule3D(reps=reps)
|
64 |
run_time = gr.Textbox(label="Runtime")
|
65 |
|
66 |
-
btn.click(predict, inputs=[input_sequence, input_ligand], outputs=[out, run_time])
|
67 |
|
68 |
app.launch()
|
|
|
8 |
|
9 |
|
10 |
|
11 |
+
def predict (input_sequence, input_ligand, input_protein):
|
12 |
start_time = time.time()
|
13 |
# Do inference here
|
14 |
+
# return an output pdb file with the protein and ligand with resname LIG or UNK.
|
15 |
end_time = time.time()
|
16 |
run_time = end_time - start_time
|
17 |
return "test_out.pdb", run_time
|
|
|
57 |
"resname": "UNK",
|
58 |
"style": "stick",
|
59 |
"color": "greenCarbon",
|
60 |
+
},
|
61 |
+
{
|
62 |
+
"model": 0,
|
63 |
+
"resname": "LIG",
|
64 |
+
"style": "stick",
|
65 |
+
"color": "greenCarbon",
|
66 |
}
|
67 |
+
|
68 |
]
|
69 |
|
70 |
out = Molecule3D(reps=reps)
|
71 |
run_time = gr.Textbox(label="Runtime")
|
72 |
|
73 |
+
btn.click(predict, inputs=[input_sequence, input_ligand, input_protein], outputs=[out, run_time])
|
74 |
|
75 |
app.launch()
|