exact_data2023/application/services/style_services.py
2023-06-14 00:03:39 +02:00

16 lines
432 B
Python

from flask import(
request,
jsonify,
Blueprint,
)
from application.functions.style import style_prediction, clear_data
style_service = Blueprint("style_service", __name__)
@style_service.route("/get_style_data", methods=['POST'])
def get_data():
data = request.get_json()
data_clear = clear_data(data)
predicitons = style_prediction(data_clear)
return jsonify({"predictions": predicitons})