Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -521,6 +521,21 @@ graph = builder.compile()
|
|
| 521 |
|
| 522 |
@spaces.GPU
|
| 523 |
def MoleculeAgent(task, smiles, name):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 524 |
|
| 525 |
#if Similars_image.png exists, remove it
|
| 526 |
if os.path.exists('Similars_image.png'):
|
|
|
|
| 521 |
|
| 522 |
@spaces.GPU
|
| 523 |
def MoleculeAgent(task, smiles, name):
|
| 524 |
+
'''
|
| 525 |
+
This Agent performs three tasks:
|
| 526 |
+
1. Can fetch a SMILES string for a molecule based on the name
|
| 527 |
+
2. Can fetch an IUPAC and common name for a molecule based on the SMILES string
|
| 528 |
+
3. Can find molecules similar to a given molecule based on its SMILES string.
|
| 529 |
+
|
| 530 |
+
Args:
|
| 531 |
+
task: the specific task to perform
|
| 532 |
+
smiles: the smiles string of the molecule to be studied
|
| 533 |
+
name: the name of the molecule to be studied.
|
| 534 |
+
(only the smiles or name are needed, not both. The other should be passed as None)
|
| 535 |
+
Returns:
|
| 536 |
+
replies[-1]: a text string containing the requested information.
|
| 537 |
+
img: an image of the similar molecules, or a blank image.
|
| 538 |
+
'''
|
| 539 |
|
| 540 |
#if Similars_image.png exists, remove it
|
| 541 |
if os.path.exists('Similars_image.png'):
|