rhg-elan-transcriber / environment.py
micahg's picture
Initial commit
4dc8f4b
raw
history blame contribute delete
No virus
523 Bytes
from os import getenv, chdir
from os.path import dirname
from tempfile import gettempdir
from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
# switch to the project directory
PROJECT_PATH = dirname(__file__)
chdir(PROJECT_PATH)
# load environment variables
DEFAULT_MODEL_LANGUAGE = getenv("DEFAULT_MODEL_LANGUAGE")
DEFAULT_MODEL = getenv("DEFAULT_MODEL")
DEFAULT_LANGUAGE = getenv("DEFAULT_LANGUAGE")
TEMP_PATH = Path(gettempdir())
OUTPUT_PATH = Path(getenv("OUTPUT_PATH"))
DEVICE=int(getenv("DEVICE"))