Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -977,6 +977,25 @@ graph = builder.compile()
|
|
| 977 |
|
| 978 |
@spaces.GPU
|
| 979 |
def ProteinAgent(task, protein, up_id, chembl_id, pdb_id, smiles):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 980 |
input = {
|
| 981 |
"messages": [
|
| 982 |
HumanMessage(f'query_task: {task}, query_protein: {protein}, query_up_id: {up_id}, query_chembl: {chembl_id}, query_pdb: {pdb_id}, query_smiles: {smiles}')
|
|
|
|
| 977 |
|
| 978 |
@spaces.GPU
|
| 979 |
def ProteinAgent(task, protein, up_id, chembl_id, pdb_id, smiles):
|
| 980 |
+
'''
|
| 981 |
+
This Agent can perform several protein-related tasks. It can find UNIPROT IDs for a protein, or, given
|
| 982 |
+
a UNIPROT ID it can find Chembl IDs that match. It can find numbers of and lists of bioactive molecules
|
| 983 |
+
based on a Chembl ID. It can query the protein databank to find PDB IDs matching a protein name and return
|
| 984 |
+
the IDs and titles. It can find a particular PDB ID and report information such as how many chains it contains,
|
| 985 |
+
the sequence, and any small molecules or ligands bound in the structure.
|
| 986 |
+
|
| 987 |
+
Args:
|
| 988 |
+
task: the task to carry out
|
| 989 |
+
protein: a protein name
|
| 990 |
+
up_id: a UNIPROT ID
|
| 991 |
+
chembl_id: a chembl ID
|
| 992 |
+
pdb_id: a PDB ID
|
| 993 |
+
smiles: a SMILES string for a molecule.
|
| 994 |
+
|
| 995 |
+
Returns:
|
| 996 |
+
replies[-1]: a text string containing the information requested
|
| 997 |
+
img: an image if appropriate, otherwise a blank image.
|
| 998 |
+
'''
|
| 999 |
input = {
|
| 1000 |
"messages": [
|
| 1001 |
HumanMessage(f'query_task: {task}, query_protein: {protein}, query_up_id: {up_id}, query_chembl: {chembl_id}, query_pdb: {pdb_id}, query_smiles: {smiles}')
|