KhomZ / Automatic-Number-Plate-Recognition-with-SMS-Alert

Automatic Nepali Number Plate Recognition with Sms Reporting System x Real Time Machine Learning Approach on Traffic Congestion Prediction System in Internet of Vehicles
MIT License
1 stars 0 forks source link

Use a production WSGI server instead. #21

Open KhomZ opened 2 years ago

KhomZ commented 2 years ago

from flask import Flask, render_template, request import os from deeplearning import OCR

webserver gateway interface

app = Flask(name)

BASE_PATH = os.getcwd() UPLOAD_PATH = os.path.join( BASE_PATH, 'WebbApp/static/predict/upload')

@app.route('/', methods=['POST', 'GET']) def index(): if request.method == 'POST': upload_file = request.files['image_name'] filename = upload_file.filename path_save = os.path.join(UPLOAD_PATH, filename) upload_file.save(path_save) text = OCR(path_save, filename)

    return render_template('index.html', upload=True, upload_image=filename, text=text)

return render_template('index.html', upload=False)

if name == "main": app.run(debug=True)

SystemExit: 1

KhomZ commented 2 years ago

https://flask.palletsprojects.com/en/2.2.x/tutorial/deploy/

KhomZ commented 2 years ago

try

$ pip install waitress