(new) added picture generation for flask app