Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,11 @@ from dotenv import load_dotenv
|
|
| 5 |
# Ensure environment variables are loaded
|
| 6 |
load_dotenv()
|
| 7 |
|
| 8 |
-
# Insert the backend
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Import the application factory from our partitioned architecture
|
| 12 |
from backend_structured import create_app
|
|
|
|
| 5 |
# Ensure environment variables are loaded
|
| 6 |
load_dotenv()
|
| 7 |
|
| 8 |
+
# Insert the backend & backend_structured modules into python path so internal absolute imports work
|
| 9 |
+
root_dir = os.path.dirname(os.path.abspath(__file__))
|
| 10 |
+
sys.path.insert(0, os.path.join(root_dir, 'backend_structured'))
|
| 11 |
+
sys.path.insert(0, os.path.join(root_dir, 'backend'))
|
| 12 |
+
sys.path.insert(0, root_dir)
|
| 13 |
|
| 14 |
# Import the application factory from our partitioned architecture
|
| 15 |
from backend_structured import create_app
|