[data]
This commit is contained in:
parent
e2c7880ca2
commit
55977d9dc4
|
@ -34,11 +34,14 @@ strategies = {
|
||||||
|
|
||||||
@app.route("/", methods=["GET", "POST"])
|
@app.route("/", methods=["GET", "POST"])
|
||||||
def probabilities():
|
def probabilities():
|
||||||
if request.method == 'GET':
|
if request.method == "GET":
|
||||||
logger.warning("GET request: using default context parameters")
|
logger.warning("GET request: using default context parameters")
|
||||||
phone_data = request.get_json(force=True)
|
context = Context()
|
||||||
logger.debug("phone_data:\n%s", json.dumps(phone_data, indent=2))
|
else:
|
||||||
context = Context(**phone_data)
|
phone_data = request.get_json(force=True)
|
||||||
|
logger.debug("phone_data:\n%s", json.dumps(phone_data, indent=2))
|
||||||
|
context = Context(**phone_data["data"])
|
||||||
|
|
||||||
logger.debug("Context: %s", context)
|
logger.debug("Context: %s", context)
|
||||||
|
|
||||||
predictions: List[dict] = []
|
predictions: List[dict] = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user