exact_data2023/application/services/errors_service.py

15 lines
403 B
Python
Raw Normal View History

2023-05-28 14:50:23 +02:00
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})