forked from pedroccorreia/metadata_explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
38 lines (25 loc) · 1.06 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Load environment dependent variables from yaml file
import yaml
from enum import Enum
with open('config.yaml', 'r') as file:
config_info = yaml.safe_load(file)
PROJECT_NUMBER = config_info['project']['project_number']
PROJECT_ID = config_info['project']['project_id']
LOCATION= config_info['project']['location']
EMBEDDING_MODEL = config_info['models']['embedding']
CREATION_MODEL = config_info['models']['creation']
OUTPUT_BUCKET = config_info['storage']['output_bucket']
INPUT_BUCKET = config_info['storage']['input_bucket']
VIDEO_FIRESTORE_DATABASE = config_info['db']['video']
IMAGE_FIRESTORE_DATABASE = config_info['db']['image']
AUDIO_FIRESTORE_DATABASE = config_info['db']['audio']
ARTICLE_FIRESTORE_DATABASE = config_info['db']['article']
SEARCH_DEPLOYED_INDEX_ID = config_info['search']['deployed_index_id']
SEARCH_ENDPOINT_ID = config_info['search']['index_endpoint']
SERVICE_ACCOUNT_KEY_FILE = 'secrets/credentials.json'
class AssetTypes(Enum):
ARTICLE = "article"
AUDIO = "audio"
IMAGE = "image"
VIDEO = "video"
SEGMENT = "segment"