#!/usr/bin/env python

import sys

def main(model_filename, img_filename):
    from predictor import Predictor
    from PIL import Image
    p = Predictor(model_filename)
    result = p.predict(Image.open(img_filename))
    print(str(result))

def usage():
    print("""Usage:

test.py modelfile imagefile""")

if __name__ == "__main__":
    if len(sys.argv) != 3:
        usage()
    else:
        main(sys.argv[1], sys.argv[2])

