Update inference_app.py
Browse files- inference_app.py +5 -1
inference_app.py
CHANGED
|
@@ -6,18 +6,22 @@ import gradio as gr
|
|
| 6 |
|
| 7 |
from gradio_molecule3d import Molecule3D
|
| 8 |
|
|
|
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
def predict (input_seq_1, input_msa_1, input_protein_1, input_seq_2,input_msa_2, input_protein_2):
|
| 13 |
start_time = time.time()
|
| 14 |
# Do inference here
|
|
|
|
|
|
|
| 15 |
# return an output pdb file with the protein and two chains A and B.
|
| 16 |
# also return a JSON with any metrics you want to report
|
| 17 |
metrics = {"mean_plddt": 80, "binding_affinity": 2}
|
| 18 |
end_time = time.time()
|
| 19 |
run_time = end_time - start_time
|
| 20 |
-
return "
|
| 21 |
|
| 22 |
with gr.Blocks() as app:
|
| 23 |
|
|
|
|
| 6 |
|
| 7 |
from gradio_molecule3d import Molecule3D
|
| 8 |
|
| 9 |
+
from inference_single import inference
|
| 10 |
+
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
def predict (input_seq_1, input_msa_1, input_protein_1, input_seq_2,input_msa_2, input_protein_2):
|
| 15 |
start_time = time.time()
|
| 16 |
# Do inference here
|
| 17 |
+
inference(input_protein_1, input_protein_2)
|
| 18 |
+
|
| 19 |
# return an output pdb file with the protein and two chains A and B.
|
| 20 |
# also return a JSON with any metrics you want to report
|
| 21 |
metrics = {"mean_plddt": 80, "binding_affinity": 2}
|
| 22 |
end_time = time.time()
|
| 23 |
run_time = end_time - start_time
|
| 24 |
+
return "output.pdb",json.dumps(metrics), run_time
|
| 25 |
|
| 26 |
with gr.Blocks() as app:
|
| 27 |
|