jibsn commited on
Commit
7d64d36
·
verified ·
1 Parent(s): b8b9877

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -54,7 +54,10 @@ def predict(input_image):
54
  predictions = session.run([output_name], {input_name: processed_image})
55
 
56
  # 假设模型输出是SMILES字符串
57
- smiles = predictions[0][0] # 根据实际模型输出格式调整
 
 
 
58
 
59
  # 使用RDKit生成分子结构图
60
  mol_image = visualize_molecule(smiles)
 
54
  predictions = session.run([output_name], {input_name: processed_image})
55
 
56
  # 假设模型输出是SMILES字符串
57
+ output = predictions[0] # 根据实际模型输出格式调整
58
+ atoms_df, bonds_list,charge_list =bbox_to_graph_with_charge(output, idx_to_labels=idx_to_labels,
59
+ bond_labels=bond_labels, result=[])
60
+ smiles,mol_rebuit=mol_from_graph_with_chiral(atoms_df, bonds_list,charge_list )
61
 
62
  # 使用RDKit生成分子结构图
63
  mol_image = visualize_molecule(smiles)