Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -701,7 +701,7 @@ should be called before this tool.
|
|
| 701 |
|
| 702 |
if len(tool_choices) == 1:
|
| 703 |
tool1 = tool_choices[0].strip()
|
| 704 |
-
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'] == ''):
|
| 705 |
tool1 = 'list_bioactives_tool'
|
| 706 |
if tool1.lower() == 'none':
|
| 707 |
tool_choice = (None, None)
|
|
@@ -710,9 +710,9 @@ should be called before this tool.
|
|
| 710 |
elif len(tool_choices) == 2:
|
| 711 |
tool1 = tool_choices[0].strip()
|
| 712 |
tool2 = tool_choices[1].strip()
|
| 713 |
-
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'] == ''):
|
| 714 |
tool1 = 'list_bioactives_tool'
|
| 715 |
-
if (tool2 == 'get_bioactives_tool') and (state['query_chembl'] == ''):
|
| 716 |
tool2 = 'list_bioactives_tool'
|
| 717 |
if tool1.lower() == 'none' and tool2.lower() == 'none':
|
| 718 |
tool_choice = (None, None)
|
|
@@ -731,7 +731,7 @@ should be called before this tool.
|
|
| 731 |
state["which_tool"] = 0
|
| 732 |
print(f"The chosen tools are: {tool_choice}")
|
| 733 |
print('task, chembl')
|
| 734 |
-
print(f"{state['query_task']}, chembl =({state['query_chembl']}, uniprot =({state['query_up_id']}")
|
| 735 |
|
| 736 |
return state
|
| 737 |
|
|
@@ -799,7 +799,7 @@ should be called before this tool.
|
|
| 799 |
|
| 800 |
if len(tool_choices) == 1:
|
| 801 |
tool1 = tool_choices[0].strip()
|
| 802 |
-
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'] == ''):
|
| 803 |
tool1 = 'list_bioactives_tool'
|
| 804 |
if tool1.lower() == 'none':
|
| 805 |
tool_choice = (None, None)
|
|
@@ -808,9 +808,9 @@ should be called before this tool.
|
|
| 808 |
elif len(tool_choices) == 2:
|
| 809 |
tool1 = tool_choices[0].strip()
|
| 810 |
tool2 = tool_choices[1].strip()
|
| 811 |
-
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'] == ''):
|
| 812 |
tool1 = 'list_bioactives_tool'
|
| 813 |
-
if (tool2 == 'get_bioactives_tool') and (state['query_chembl'] == ''):
|
| 814 |
tool2 = 'list_bioactives_tool'
|
| 815 |
if tool1.lower() == 'none' and tool2.lower() == 'none':
|
| 816 |
tool_choice = (None, None)
|
|
|
|
| 701 |
|
| 702 |
if len(tool_choices) == 1:
|
| 703 |
tool1 = tool_choices[0].strip()
|
| 704 |
+
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'].strip() == ''):
|
| 705 |
tool1 = 'list_bioactives_tool'
|
| 706 |
if tool1.lower() == 'none':
|
| 707 |
tool_choice = (None, None)
|
|
|
|
| 710 |
elif len(tool_choices) == 2:
|
| 711 |
tool1 = tool_choices[0].strip()
|
| 712 |
tool2 = tool_choices[1].strip()
|
| 713 |
+
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'].strip() == ''):
|
| 714 |
tool1 = 'list_bioactives_tool'
|
| 715 |
+
if (tool2 == 'get_bioactives_tool') and (state['query_chembl'].strip() == ''):
|
| 716 |
tool2 = 'list_bioactives_tool'
|
| 717 |
if tool1.lower() == 'none' and tool2.lower() == 'none':
|
| 718 |
tool_choice = (None, None)
|
|
|
|
| 731 |
state["which_tool"] = 0
|
| 732 |
print(f"The chosen tools are: {tool_choice}")
|
| 733 |
print('task, chembl')
|
| 734 |
+
print(f"{state['query_task']}, chembl =({state['query_chembl']}), uniprot =({state['query_up_id']})")
|
| 735 |
|
| 736 |
return state
|
| 737 |
|
|
|
|
| 799 |
|
| 800 |
if len(tool_choices) == 1:
|
| 801 |
tool1 = tool_choices[0].strip()
|
| 802 |
+
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'].strip() == ''):
|
| 803 |
tool1 = 'list_bioactives_tool'
|
| 804 |
if tool1.lower() == 'none':
|
| 805 |
tool_choice = (None, None)
|
|
|
|
| 808 |
elif len(tool_choices) == 2:
|
| 809 |
tool1 = tool_choices[0].strip()
|
| 810 |
tool2 = tool_choices[1].strip()
|
| 811 |
+
if (tool1 == 'get_bioactives_tool') and (state['query_chembl'].strip() == ''):
|
| 812 |
tool1 = 'list_bioactives_tool'
|
| 813 |
+
if (tool2 == 'get_bioactives_tool') and (state['query_chembl'].strip() == ''):
|
| 814 |
tool2 = 'list_bioactives_tool'
|
| 815 |
if tool1.lower() == 'none' and tool2.lower() == 'none':
|
| 816 |
tool_choice = (None, None)
|