Пример #1
0
def search():
		form = TagForm()
		if form.validate_on_submit():
				flash("Provided tag: %s" % form.tag.data)
				t = form.tag.data.split(' ')
				fix_t = t[0]
				# the below line will import new images by tag. Commenting out for dev
				Setup(fix_t)
				Analyze()
				cols = [process.compile()]
				pcols = [cssmaker.make(cols)]

				return redirect(url_for('results', tag=fix_t, main_cols=cols, p_cols=pcols))
		return render_template('query.html',
													 title='Tag Search',
													 form=form)
Пример #2
0
def main():
    ''' we already have some test images. Commenting out new downloads until this feature is finished.'''
    cur = os.getcwd()
    img_dir = cur + '/app/static/images/'
    process.compile(img_dir + "Average.jpg")