(inception_path)
return str(model_file)
Checks if the path to the inception file is valid, or downloads
    the file if it is not present.

    Args:
        inception_path (str): Directory for storing the inception model.

    Returns:
        str: File path of the inception protobuf model.
Checks if the path to the inception file is valid, or downloads
    the file if it is not present.
Checks if the path to the inception file is valid or downloads the file if it is not present .
def _check_or_download_inception(inception_path):
    """
    Checks if the path to the inception file is valid, or downloads
    the file if it is not present.

    Args:
        inception_path (str): Directory for storing the inception model.

    Returns:
        str: File path of the inception protobuf model.

    """
    # Build file path of model
    inception_url = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz'
    if inception_path is None:
        inception_path = '/tmp'
    inception_path = pathlib.Path(inception_path)
    model_file = inception_path / 'classify_image_graph_def.pb'

    # Download model if required
    if not model_file.exists():
        print("Downloading Inception model")
        fn, _ = request.urlretrieve(inception_url)

        with tarfile.open(fn, mode='r') as f:
            f.extract('classify_image_graph_def.pb', str(model_file.parent))

    return str(model_file)
def _check_or_download_inception ( inception_path ) : # Build file path of model inception_url = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz' if inception_path is None : inception_path = '/tmp' inception_path = pathlib . Path ( inception_path ) model_file = inception_path / 'classify_image_graph_def.pb' # Download model if required if not model_file . exists ( ) : print ( "Downloading Inception model" ) fn , _ = request . urlretrieve ( inception_url ) with tarfile . open ( fn , mode = 'r' ) as f : f . extract ( 'classify_image_graph_def.pb' , str ( model_file . parent ) ) return str ( model_file )