deepsafe's picture
Upload DeepSafe services: model weights and inference code
505afd3 verified
Raw History Blame
348 Bytes
# -*- coding: utf-8 -*-
import os
from yaml import dump, load
try:
from yaml import CDumper as Dumper
from yaml import CLoader as Loader
except ImportError:
from yaml import Loader, Dumper
from box import Box as edict
def load_config(cfg):
with open(cfg) as f:
config = load(f, Loader=Loader)
return edict(config)