Spaces:
Paused
Paused
alessandro trinca tornidor
commited on
Commit
·
5c21342
1
Parent(s):
ae85d7f
[feat] use the env RESOURCES_FOLDER for resource folder, default on PROJECT_ROOT_FOLDER and lisa-on-cuda ROOT project folder
Browse files- lisa_on_cuda/utils/utils.py +2 -1
- pyproject.toml +2 -2
lisa_on_cuda/utils/utils.py
CHANGED
|
@@ -46,6 +46,7 @@ ANSWER_LIST = [
|
|
| 46 |
]
|
| 47 |
ROOT = Path(__file__).parent.parent.parent
|
| 48 |
PROJECT_ROOT_FOLDER = os.getenv("PROJECT_ROOT_FOLDER", ROOT)
|
|
|
|
| 49 |
FASTAPI_STATIC = os.getenv("FASTAPI_STATIC", ROOT / "static")
|
| 50 |
VIS_OUTPUT = os.getenv("VIS_OUTPUT", ROOT / "vis_output")
|
| 51 |
|
|
@@ -175,7 +176,7 @@ def create_placeholder_variables():
|
|
| 175 |
import cv2
|
| 176 |
|
| 177 |
try:
|
| 178 |
-
placeholders_folder =
|
| 179 |
logging.info(f"placeholders_folder:{placeholders_folder}.")
|
| 180 |
no_seg_out = cv2.imread(str(placeholders_folder / "no_seg_out.png"))[:, :, ::-1]
|
| 181 |
error_happened = cv2.imread(str(placeholders_folder / "error_happened.png"))[:, :, ::-1]
|
|
|
|
| 46 |
]
|
| 47 |
ROOT = Path(__file__).parent.parent.parent
|
| 48 |
PROJECT_ROOT_FOLDER = os.getenv("PROJECT_ROOT_FOLDER", ROOT)
|
| 49 |
+
RESOURCES_FOLDER = os.getenv("RESOURCES_FOLDER", PROJECT_ROOT_FOLDER / "resources")
|
| 50 |
FASTAPI_STATIC = os.getenv("FASTAPI_STATIC", ROOT / "static")
|
| 51 |
VIS_OUTPUT = os.getenv("VIS_OUTPUT", ROOT / "vis_output")
|
| 52 |
|
|
|
|
| 176 |
import cv2
|
| 177 |
|
| 178 |
try:
|
| 179 |
+
placeholders_folder = RESOURCES_FOLDER / "placeholders"
|
| 180 |
logging.info(f"placeholders_folder:{placeholders_folder}.")
|
| 181 |
no_seg_out = cv2.imread(str(placeholders_folder / "no_seg_out.png"))[:, :, ::-1]
|
| 182 |
error_happened = cv2.imread(str(placeholders_folder / "error_happened.png"))[:, :, ::-1]
|
pyproject.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
[tool.poetry]
|
| 2 |
name = "lisa-on-cuda"
|
| 3 |
-
version = "1.0.
|
| 4 |
description = ""
|
| 5 |
authors = ["alessandro trinca tornidor <[email protected]>"]
|
| 6 |
license = "Apache 2.0"
|
|
@@ -8,7 +8,7 @@ readme = "README.md"
|
|
| 8 |
|
| 9 |
[metadata]
|
| 10 |
name = "lisa-on-cuda"
|
| 11 |
-
version = "1.0.
|
| 12 |
|
| 13 |
[tool.poetry.dependencies]
|
| 14 |
python = "~3.10"
|
|
|
|
| 1 |
[tool.poetry]
|
| 2 |
name = "lisa-on-cuda"
|
| 3 |
+
version = "1.0.3"
|
| 4 |
description = ""
|
| 5 |
authors = ["alessandro trinca tornidor <[email protected]>"]
|
| 6 |
license = "Apache 2.0"
|
|
|
|
| 8 |
|
| 9 |
[metadata]
|
| 10 |
name = "lisa-on-cuda"
|
| 11 |
+
version = "1.0.3"
|
| 12 |
|
| 13 |
[tool.poetry.dependencies]
|
| 14 |
python = "~3.10"
|