"""Utility to load compute graphs from diffrent sources."""

import os

def load_compute_graph(name):
  path = os.path.join('/opt/aiy/models', name)
  with open(path, 'rb') as f:
    return f.read()


"""Utility to load compute graphs from diffrent sources."""

import os


def load_compute_graph(name):
  path = os.environ.get('VISION_BONNET_MODELS_PATH', '/opt/aiy/models')
  with open(os.path.join(path, name), 'rb') as f:
    return f.read()

Use VISION_BONNET_MODELS_PATH env var for custom models path.
Use VISION_BONNET_MODELS_PATH env var for custom models path.

Change-Id: I687ca96e4cf768617fa45d50d68dadffde750b87
