Spaces:
Running
Running
temporary database
Browse files
backend/__pycache__/db.cpython-311.pyc
CHANGED
Binary files a/backend/__pycache__/db.cpython-311.pyc and b/backend/__pycache__/db.cpython-311.pyc differ
|
|
backend/__pycache__/db_cache.cpython-311.pyc
CHANGED
Binary files a/backend/__pycache__/db_cache.cpython-311.pyc and b/backend/__pycache__/db_cache.cpython-311.pyc differ
|
|
backend/db.py
CHANGED
@@ -8,14 +8,11 @@ import logging
|
|
8 |
|
9 |
logger = logging.getLogger(__name__)
|
10 |
|
11 |
-
# Database file path
|
12 |
-
DB_PATH = os.getenv("DATABASE_PATH", "/app/ai_tutor.db")
|
13 |
-
|
14 |
|
15 |
class Database:
|
16 |
"""Pure SQLite database handler for AI Language Tutor"""
|
17 |
|
18 |
-
def __init__(self, db_path: str =
|
19 |
self.db_path = db_path
|
20 |
|
21 |
async def initialize(self):
|
|
|
8 |
|
9 |
logger = logging.getLogger(__name__)
|
10 |
|
|
|
|
|
|
|
11 |
|
12 |
class Database:
|
13 |
"""Pure SQLite database handler for AI Language Tutor"""
|
14 |
|
15 |
+
def __init__(self, db_path: str = "/tmp/ai_tutor.db"):
|
16 |
self.db_path = db_path
|
17 |
|
18 |
async def initialize(self):
|
backend/db_cache.py
CHANGED
@@ -6,11 +6,10 @@ import logging
|
|
6 |
import hashlib
|
7 |
|
8 |
logger = logging.getLogger(__name__)
|
9 |
-
DB_PATH = os.getenv("DATABASE_PATH", "/app/ai_tutor.db")
|
10 |
|
11 |
class ApiCache:
|
12 |
"""Generic caching service using a dedicated database table."""
|
13 |
-
def __init__(self, db_path: str =
|
14 |
self.db_path = db_path
|
15 |
|
16 |
def _generate_hash(self, text: str) -> str:
|
|
|
6 |
import hashlib
|
7 |
|
8 |
logger = logging.getLogger(__name__)
|
|
|
9 |
|
10 |
class ApiCache:
|
11 |
"""Generic caching service using a dedicated database table."""
|
12 |
+
def __init__(self, db_path: str = "/tmp/ai_tutor.db"):
|
13 |
self.db_path = db_path
|
14 |
|
15 |
def _generate_hash(self, text: str) -> str:
|