exact_data2023/application/services/errors_service.py
2023-05-28 14:50:23 +02:00

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})