@app.route(
    '/v' + API_VERSION + '/deployments/<int:deployment_id>/suggest_categories',
    methods=['POST'])
def suggest_categories(deployment_id):
    if not request.json:
        abort(400)
    if category_classifier is None:
        app.logger.error("The category classifier is unavailable")
        return
    verify_deployment(deployment_id)
    _post = request.json
    if not 'title' in _post and not 'description' in _post:
        abort(400)
    categories = category_classifier.predictProba(_post)
    return jsonify({'categories': categories})
Create a small-world generator with k initial neighbours and a re-wiring probability p
dataset/ETHPy150Open dssg/ushine-learning/dssg/webapp/rest_api.py/suggest_categories--crossover with--dataset/ETHPy150Open charanpald/APGL/apgl/generator/SmallWorldGenerator.py/SmallWorldGenerator.__init__