Spaces:
Runtime error
Runtime error
Commit Β·
64f7a3e
1
Parent(s): a3d0f66
Configure database path to /tmp/users.db on Linux to support write operations in Hugging Face read-only containers
Browse files
app.py
CHANGED
|
@@ -129,7 +129,8 @@ DISEASE_INFO = {
|
|
| 129 |
# ββββββββββββββββββββββββββββββββββββββββββββββ
|
| 130 |
|
| 131 |
def get_db():
|
| 132 |
-
|
|
|
|
| 133 |
conn.row_factory = sqlite3.Row
|
| 134 |
return conn
|
| 135 |
|
|
|
|
| 129 |
# ββββββββββββββββββββββββββββββββββββββββββββββ
|
| 130 |
|
| 131 |
def get_db():
|
| 132 |
+
db_path = "/tmp/users.db" if os.name != "nt" else "users.db"
|
| 133 |
+
conn = sqlite3.connect(db_path)
|
| 134 |
conn.row_factory = sqlite3.Row
|
| 135 |
return conn
|
| 136 |
|