simonduerr commited on
Commit
dadbe2e
1 Parent(s): 43105fe

Update inference_app.py

Browse files
Files changed (1) hide show
  1. inference_app.py +5 -2
inference_app.py CHANGED
@@ -12,9 +12,11 @@ def predict (input_sequence, input_ligand,input_msa, 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", "test_docking_pose.sdf"], run_time
18
 
19
  with gr.Blocks() as app:
20
 
@@ -63,8 +65,9 @@ with gr.Blocks() as app:
63
  ]
64
 
65
  out = Molecule3D(reps=reps)
 
66
  run_time = gr.Textbox(label="Runtime")
67
 
68
- btn.click(predict, inputs=[input_sequence, input_ligand, input_msa, input_protein], outputs=[out, run_time])
69
 
70
  app.launch()
 
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
+ # also return any metrics you want to log, metrics will not be used for evaluation but might be useful for users
16
+ metrics = {"mean_plddt": 80, "binding_affinity": -2}
17
  end_time = time.time()
18
  run_time = end_time - start_time
19
+ return ["test_out.pdb", "test_docking_pose.sdf"], metrics, run_time
20
 
21
  with gr.Blocks() as app:
22
 
 
65
  ]
66
 
67
  out = Molecule3D(reps=reps)
68
+ metrics = gr.JSON(label="Metrics")
69
  run_time = gr.Textbox(label="Runtime")
70
 
71
+ btn.click(predict, inputs=[input_sequence, input_ligand, input_msa, input_protein], outputs=[out,metrics, run_time])
72
 
73
  app.launch()