Spaces:
Paused
Paused
Commit
·
d5ce498
1
Parent(s):
38a3cf3
Auto-commit: app.py updated
Browse files
app.py
CHANGED
|
@@ -127,10 +127,17 @@ AI_MODELS = {
|
|
| 127 |
}
|
| 128 |
|
| 129 |
def init_database():
|
| 130 |
-
"""Initialize SQLite database for authentication"""
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
# Create users table
|
| 136 |
cursor.execute("""
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
def init_database():
|
| 130 |
+
"""Initialize SQLite database for authentication - Linux optimized"""
|
| 131 |
+
try:
|
| 132 |
+
# Use Linux-friendly paths
|
| 133 |
+
data_dir = Path("/home/user/app/data")
|
| 134 |
+
data_dir.mkdir(exist_ok=True)
|
| 135 |
+
|
| 136 |
+
db_path = data_dir / "openmanus.db"
|
| 137 |
+
logger.info(f"Initializing database at {db_path}")
|
| 138 |
+
|
| 139 |
+
conn = sqlite3.connect(str(db_path))
|
| 140 |
+
cursor = conn.cursor()
|
| 141 |
|
| 142 |
# Create users table
|
| 143 |
cursor.execute("""
|