aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask')
-rw-r--r--gn2/wqflask/views.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py
index 5b83bb82..2383e455 100644
--- a/gn2/wqflask/views.py
+++ b/gn2/wqflask/views.py
@@ -243,12 +243,14 @@ def search_page_table():
def gsearchact():
result = GSearch(request.args).__dict__
search_type = request.args['type']
- ai_result = {
- "search_term": "which animal has the same number of chromosomes as human",
- "search_result": "The Bama miniature pig has the same number of chromosomes as humans",
- # we need to modify the search to use url params so that we can easily link
- "search_url": "https://qa.genenetwork.org/gnqna"
- }
+ ai_result = None
+ if current_app.config.get("AI_SEARCH_ENABLED"):
+ ai_result = {
+ "search_term": "which animal has the same number of chromosomes as human",
+ "search_result": "The Bama miniature pig has the same number of chromosomes as humans",
+ # we need to modify the search to use url params so that we can easily link
+ "search_url": "https://qa.genenetwork.org/gnqna"
+ }
if search_type == "gene":
return render_template("gsearch_gene.html", **result, ai_result=ai_result)
elif search_type == "phenotype":