Spaces:
Running
Running
Local paths fix
Browse files
app.py
CHANGED
|
@@ -18,14 +18,6 @@ spec = importlib.util.spec_from_file_location("antique_auth_code_app", app_path)
|
|
| 18 |
module = importlib.util.module_from_spec(spec)
|
| 19 |
spec.loader.exec_module(module)
|
| 20 |
|
| 21 |
-
# Optionally: remove CODE_DIR from sys.path after loading to avoid side effects
|
| 22 |
-
try:
|
| 23 |
-
# remove the first occurrence we added
|
| 24 |
-
if sys.path[0] == CODE_DIR:
|
| 25 |
-
sys.path.pop(0)
|
| 26 |
-
except Exception:
|
| 27 |
-
pass
|
| 28 |
-
|
| 29 |
# The FastAPI `app` object expected inside code/app.py
|
| 30 |
app = getattr(module, "app")
|
| 31 |
|
|
|
|
| 18 |
module = importlib.util.module_from_spec(spec)
|
| 19 |
spec.loader.exec_module(module)
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
# The FastAPI `app` object expected inside code/app.py
|
| 22 |
app = getattr(module, "app")
|
| 23 |
|