Example #1
0
def api_get_predictions():
    count = request.args.get('count', 50)
    crime_set = get_crimes(count)
    predictions = predict_crime(crime_set)
    return json.dumps([p.__serialize__() for p in predictions])
Example #2
0
def api_get_crimes():
    count = request.args.get('count', 50)
    return json.dumps([c.__serialize__() for c in get_crimes(count)])