cafierom commited on
Commit
99fa6ac
·
verified ·
1 Parent(s): f3b8caa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -450,7 +450,7 @@ builder.add_edge("reflect_node", END)
450
  graph = builder.compile()
451
 
452
  @spaces.GPU
453
- def PropAgent(smiles, reference, task):
454
 
455
  #if Substitution_image.png exists, remove it
456
  if os.path.exists('Substitution_image.png'):
@@ -501,6 +501,7 @@ with gr.Blocks(fill_height=True) as forest:
501
  pic = gr.Image(label="Molecule")
502
 
503
 
504
- calc_btn.click(PropAgent, inputs = [smiles, ref, task], outputs = [props, pic])
 
505
 
506
  forest.launch(debug=False, mcp_server=True)
 
450
  graph = builder.compile()
451
 
452
  @spaces.GPU
453
+ def PropAgent(task, smiles, reference):
454
 
455
  #if Substitution_image.png exists, remove it
456
  if os.path.exists('Substitution_image.png'):
 
501
  pic = gr.Image(label="Molecule")
502
 
503
 
504
+ calc_btn.click(PropAgent, inputs = [task, smiles, ref], outputs = [props, pic])
505
+ task.submit(PropAgent, inputs = [task, smiles, ref], outputs = [props, pic])
506
 
507
  forest.launch(debug=False, mcp_server=True)