From 29c5f303bb30ec10803c15a5ebc98054e0f56c35 Mon Sep 17 00:00:00 2001 From: John Nduli Date: Thu, 12 Sep 2024 15:06:16 +0300 Subject: fix: gnqa_answer but fix for missing html --- gn2/wqflask/templates/gnqa_answer.html | 44 ++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'gn2') diff --git a/gn2/wqflask/templates/gnqa_answer.html b/gn2/wqflask/templates/gnqa_answer.html index 91fa4981..e2e39956 100644 --- a/gn2/wqflask/templates/gnqa_answer.html +++ b/gn2/wqflask/templates/gnqa_answer.html @@ -1,7 +1,19 @@ +{% extends "base.html" %} + +{% block css %} + +{% endblock %} + +{% block content %} +

- {{ query }} + {{ query }}
{{ answer|safe }}

@@ -20,32 +32,24 @@ title="Vote Down"> - - +
-

References

+

References

{% if references %}

GeneNetwork.org, genomics/genetics with regards to diabetes and genomics/genetics with regards to agin.. +

+

+ At the moment when you ask GNQA something it will attempt to return a sensible answer with real references. To this end we aim to reduce hallucinations and provide a knowledge launchpad for a researcher to enhance their knowledge on the relevant subject matter. +

+

GNQA is not a finished product as we are working diligently to improve it daily.

+

+ Thanks for using GNQA! +

+
+
+ {% endif %} + + + {% endblock %} + {% block js %} + + + + + {% endblock %} diff --git a/gn2/wqflask/templates/gnqa_answer.html b/gn2/wqflask/templates/gnqa_answer.html index e2e39956..2e182375 100644 --- a/gn2/wqflask/templates/gnqa_answer.html +++ b/gn2/wqflask/templates/gnqa_answer.html @@ -1,15 +1,3 @@ -{% extends "base.html" %} - -{% block css %} - -{% endblock %} - -{% block content %} -

@@ -155,9 +143,9 @@

-{% endblock %} -{% block js %} - -{% endblock %} +}) + diff --git a/gn2/wqflask/templates/gsearch_gene.html b/gn2/wqflask/templates/gsearch_gene.html index 091cc435..80ed8b47 100644 --- a/gn2/wqflask/templates/gsearch_gene.html +++ b/gn2/wqflask/templates/gsearch_gene.html @@ -16,8 +16,14 @@ + + {% if do_ai_search %}
+
+ +
+ {% endif %}

To study a record, click on its Record ID below.
Check records below and click Add button to add to selection.

@@ -306,6 +312,9 @@ success: function(result) { let ai_div = ai_content_div(result.search_term, result.search_result, result.search_url) $("#ai_result").append(ai_div); + }, + complete: function() { + $("#spinner").hide(); } }) }) diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index e695b0d8..aaf40d41 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -324,7 +324,7 @@ def gnqna(): "search_url": f"/gnqna?{safe_query}", } return jsonify(ai_result) - return render_template("gnqa_answer.html", **search_result) + return render_template("gnqa.html", **search_result) else: return render_template("gnqa.html") if request.method == "POST": -- cgit v1.2.3