Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@aidserver.route("/train", methods=["GET", "POST"])
async def train(request):
if request.method == "POST":
return handle_post_solver_train_or_infer(request, UPLOAD_TRAIN_FOLDER,
"train")
@aidserver.route("/infer", methods=["GET", "POST"])
async def infer(request):
if request.method == 'POST':
return handle_post_solver_train_or_infer(request, UPLOAD_INFER_FOLDER,
"infer")
@aidserver.route("/infer", methods=["GET", "POST"])
async def infer():
if request.method == 'POST':
return await handle_post_solver_train_or_infer(request, UPLOAD_INFER_FOLDER,
"infer", PUBLIC_FOLDER)
@aidserver.route("/train", methods=["GET", "POST"])
async def train():
if request.method == "POST":
return await handle_post_solver_train_or_infer(request, UPLOAD_TRAIN_FOLDER,
"train", PUBLIC_FOLDER)