Main: Fix launch if EXPORT_OPENAPI is unset
A default needs to be provided with getenv. Fix that with an empty string. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
a59e8ef9e7
commit
b907421285
2 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ from common import config
|
|||
from common.logger import get_loading_progress_bar
|
||||
from common.utils import unwrap
|
||||
|
||||
if not os.getenv("EXPORT_OPENAPI"):
|
||||
if not os.getenv("EXPORT_OPENAPI", "").lower() in ("true", "1"):
|
||||
from backends.exllamav2.model import ExllamaV2Container
|
||||
|
||||
# Global model container
|
||||
|
|
|
|||
2
main.py
2
main.py
|
|
@ -29,7 +29,7 @@ async def entrypoint(args: Optional[dict] = None):
|
|||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
|
||||
if os.getenv("EXPORT_OPENAPI").lower() in ("true", "1"):
|
||||
if os.getenv("EXPORT_OPENAPI", "").lower() in ("true", "1"):
|
||||
openapi_json = export_openapi()
|
||||
|
||||
async with aiofiles.open("openapi.json", "w") as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue