jiaxianustc commited on
Commit
52e74e1
·
1 Parent(s): ca33195
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -118,10 +118,12 @@ def mbp_scoring(ligand_path, protein_path):
118
  def test(ligand, protein):
119
  try:
120
  IC50, K = mbp_scoring(ligand.name, protein.name)
 
 
 
121
  return '{:.2f}'.format(IC50), '{:.2f}'.format(K)
122
  except Exception as e:
123
- print(e)
124
- return 'Please set input correctly', 'Please set input correctly'
125
 
126
  with gr.Blocks() as demo:
127
  ligand = gr.File(label="ligand")
 
118
  def test(ligand, protein):
119
  try:
120
  IC50, K = mbp_scoring(ligand.name, protein.name)
121
+ print(f'ligand file name: {os.path.basename(ligand)},'
122
+ f' protein file name: {os.path.basename(protein)},'
123
+ f' IC50: {IC50}, K: {K}')
124
  return '{:.2f}'.format(IC50), '{:.2f}'.format(K)
125
  except Exception as e:
126
+ return e, e
 
127
 
128
  with gr.Blocks() as demo:
129
  ligand = gr.File(label="ligand")