Spaces:
Running
Running
siddhm11 commited on
Commit Β·
5e4eb35
1
Parent(s): d5a6f3e
Use python-dotenv for secrets management
Browse filesconfig.py now loads .env via load_dotenv() at import time.
All secrets default to empty strings in code.
Locally: .env provides credentials (in .gitignore, never pushed).
HF Spaces: set via Secrets panel (env vars).
- .gitattributes +1 -0
- .gitignore +0 -0
- app/config.py +4 -1
.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
|
Binary files a/.gitignore and b/.gitignore differ
|
|
|
app/config.py
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
"""
|
| 2 |
Centralised settings for the arxiv recommender app.
|
| 3 |
-
All credentials live
|
| 4 |
"""
|
| 5 |
import os
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# ββ Qdrant (BGE-M3 dense, 1 024-dim) βββββββββββββββββββββββββββββββββββββββββ
|
| 8 |
QDRANT_URL = os.getenv("QDRANT_URL", "")
|
|
|
|
| 1 |
"""
|
| 2 |
Centralised settings for the arxiv recommender app.
|
| 3 |
+
All credentials live in .env locally; override with env vars in production.
|
| 4 |
"""
|
| 5 |
import os
|
| 6 |
+
from dotenv import load_dotenv
|
| 7 |
+
|
| 8 |
+
load_dotenv() # reads .env file if present (won't override existing env vars)
|
| 9 |
|
| 10 |
# ββ Qdrant (BGE-M3 dense, 1 024-dim) βββββββββββββββββββββββββββββββββββββββββ
|
| 11 |
QDRANT_URL = os.getenv("QDRANT_URL", "")
|