16 lines
378 B
Python
16 lines
378 B
Python
#!/usr/bin/env python3
|
|
from flask import request, jsonify
|
|
from flask_classful import FlaskView
|
|
from utils import json_required
|
|
import json
|
|
import uwsgi
|
|
|
|
|
|
class ClassifyView(FlaskView):
|
|
|
|
@json_required
|
|
def post(self):
|
|
task = request.json # tag, features, model
|
|
uwsgi.mule_msg(json.dumps(task))
|
|
return jsonify({"status": "OK", "msg": "enqueued"})
|