def main():
    args = parse_args()
    app = App()
    if args.example:
        example(app)
        app.run_server('127.0.0.1', 8000, open_webiste=args.visualize)
    else:
        apply_convolution(args.src, args.dest, filter_kernel)
Beispiel #2
0
def main():
    args = parse_args()
    app = App()
    if args.example:
        example(app)
        app.run_server('127.0.0.1', 8000, open_webiste=args.visualize)
    else:
        make_sepia(args.src, args.dest, args.factor)
    parser.add_argument("--dest",
                        type=str,
                        help="Destination file path.",
                        default='data/')
    parser.add_argument("--factor", type=int, help="Sepia factor value")
    parser.add_argument("--example",
                        type=bool,
                        help="Show example",
                        default=False)
    parser.add_argument("--visualize",
                        type=bool,
                        help="Open visualization in webbrowser",
                        default=False)
    return parser.parse_args()


def main():
    args = parse_args()
    app = App()
    if args.example:
        example(app)
        app.run_server('127.0.0.1', 8000, open_webiste=args.visualize)
    else:
        apply_convolution(args.src, args.dest, filter_kernel)


if __name__ == "__main__":
    app = App()
    example(app)
    app.run_server("127.0.0.1", 8001, open_webiste=True)