16 lines
432 B
Python
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})
|