Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flask 파일 업로드 문제 #2

Open
sohyunwriter opened this issue Apr 30, 2020 · 0 comments
Open

flask 파일 업로드 문제 #2

sohyunwriter opened this issue Apr 30, 2020 · 0 comments

Comments

@sohyunwriter
Copy link
Owner

@app.route('/predict', methods=['GET', 'POST'])
def upload():
if request.method=='POST':
f = request.files['file']
file_path = secure_filename('./img/' + f.filename)
print(file_path)
f.save(file_path)

    preds = model_predict(file_path, model)

    pred_class = decode_predictions(preds, top=1)
    result = str(pred_class[0][0][1])
    return result
return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant