Update app.py
Browse files
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
|
| 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
|
|
|
|
| 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)
|