def recognize_photo(request): if not utility.is_model_trained(): return redirect('/train/?status=untrained') return render(request, 'recognise_photo.html')
def recognize_photo(request): if not request.user.is_authenticated(): return redirect(login) if not utility.is_model_trained(): return redirect('/train/?status=untrained') return render(request, 'recognise_photo.html')
def recognize_camera(request): if not utility.is_model_trained(): return redirect('/train/?status=untrained') return render(request, 'camera.html')