cafierom commited on
Commit
cb7f239
·
verified ·
1 Parent(s): c2fb71a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -137,16 +137,16 @@ def similars_node(state: State) -> State:
137
  smiles = res[0].smiles
138
  state["query_smiles"] = smiles
139
  print('got smiles! ', smiles)
140
- except:
141
- print('Not enough information to run similars tool')
142
- return state
143
 
144
- print('trying with smiles')
145
- res = pcp.get_compounds(smiles, "smiles", searchtype="similarity",listkey_count=50)
146
- props_string = f'The following molecules are similar to {smiles}: \n'
147
- print('got similar molecules with smiles')
 
 
148
  else:
149
  print('trying with smiles')
 
150
  res = pcp.get_compounds(smiles, "smiles", searchtype="similarity",listkey_count=50)
151
  props_string = f'The following molecules are similar to {smiles}: \n'
152
  print('got similar molecules with smiles')
 
137
  smiles = res[0].smiles
138
  state["query_smiles"] = smiles
139
  print('got smiles! ', smiles)
 
 
 
140
 
141
+ print('trying with smiles')
142
+ res = pcp.get_compounds(smiles, "smiles", searchtype="similarity",listkey_count=50)
143
+ props_string = f'The following molecules are similar to {smiles}: \n'
144
+ print('got similar molecules with smiles')
145
+ except:
146
+ print('Not enough information to run similars tool with name')
147
  else:
148
  print('trying with smiles')
149
+ smiles = state["query_smiles"]
150
  res = pcp.get_compounds(smiles, "smiles", searchtype="similarity",listkey_count=50)
151
  props_string = f'The following molecules are similar to {smiles}: \n'
152
  print('got similar molecules with smiles')