def predict_label(json_data, filename):
    print(json_data)
    (drivename, fname) = filename.split('/')
    fname = fname.split('.')[0]
    bounding_box_path = os.path.join('classify/bounding_boxes', (fname + '.json'))
    bounding_box_filename = os.path.join(CUR_DIR, bounding_box_path)
    output_path = os.path.join(CUR_DIR, 'classify/write_data.txt')
    image_filename = os.path.join(IMAGE_DIR, (fname + '.png'))
    try:
        open(bounding_box_filename, 'w').close()
    except Exception as e:
        pass
    with open(bounding_box_filename, 'a') as f:
        f.write(json_data)
    os.system('python3 {} --image_file={}'.format(os.path.join(CUR_DIR, 'classify/classifier.py'), image_filename))
    data = os.popen('cat {}'.format(output_path)).read()
    os.system('rm classify/bounding_boxes/*.json')
    return get_keyword(data)
def predict_label(json_data, filename):
    print(json_data)
    (drivename, fname) = filename.split('/')
    fname = fname.split('.')[0]
    bounding_box_path = os.path.join('classify/bounding_boxes', (fname + '.json'))
    bounding_box_filename = os.path.join(CUR_DIR, bounding_box_path)
    output_path = os.path.join(CUR_DIR, 'classify/write_data.txt')
    image_filename = os.path.join(IMAGE_DIR, (fname + '.png'))
    try:
        open(bounding_box_filename, 'w').close()
    except Exception as e:
        pass
    with open(bounding_box_filename, 'a') as f:
        f.write(json_data)
    os.system('python3 {} --image_file={}'.format(os.path.join(CUR_DIR, 'classify/classifier.py'), image_filename))
    data = os.popen('cat {}'.format(output_path)).read()
    os.system('rm classify/bounding_boxes/*.json')
    return get_keyword(data)