aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-03-25 17:59:38 +0300
committerAlexander_Kabui2024-03-25 17:59:38 +0300
commit3f6cef070625d2ac091124f4fcec98aa0e7a4dea (patch)
tree34f1e80d04877d9284b9da39f182ff821b4f7918
parentfed49b9148a5b73afd2bea99ec4f40cedb6c1c95 (diff)
downloadgenenetwork3-3f6cef070625d2ac091124f4fcec98aa0e7a4dea.tar.gz
save db data on SQLITE_PATH file path
-rw-r--r--gn3/api/llm.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py
index d46523c..c175168 100644
--- a/gn3/api/llm.py
+++ b/gn3/api/llm.py
@@ -78,8 +78,9 @@ def rating(task_id):
results.get("weight", 0))
logging.debug("the user id %s", str(user_id))
-
- with db.connection(os.path.join(current_app.config["DATA_DIR"], "/llm.db")) as conn:
+ # get base name for sqlite
+ llm_path = os.path.join(os.path.dirname(os.current_app.config["AUTH_DB"]),"llm.db")
+ with db.connection(llm_path) as conn:
cursor = conn.cursor()
create_table = """CREATE TABLE IF NOT EXISTS Rating(
user_id TEXT NOT NULL,