15 lines
403 B
Python
15 lines
403 B
Python
|
from flask import(
|
||
|
request,
|
||
|
jsonify,
|
||
|
Blueprint,
|
||
|
)
|
||
|
from application.functions.errors import errors_correction
|
||
|
|
||
|
errors_service = Blueprint("errors_service", __name__)
|
||
|
|
||
|
@errors_service.route("/get_errors", methods=['PUT'])
|
||
|
def get_data():
|
||
|
data = request.get_json()
|
||
|
predicitons = errors_correction(data['sentence']) #korekcja
|
||
|
|
||
|
return jsonify({"predictions": predicitons})
|