def share_model_ndex():
    """Upload the model to NDEX"""
    if request.method == 'OPTIONS':
        return {}
    response = request.body.read().decode('utf-8')
    body = json.loads(response)
    stmts_str = body.get('stmts')
    stmts_json = json.loads(stmts_str)
    stmts = stmts_from_json(stmts_json["statements"])
    ca = CxAssembler(stmts)
    for n, v in body.items():
        ca.cx['networkAttributes'].append({'n': n, 'v': v, 'd': 'string'})
    ca.make_model()
    network_id = ca.upload_model(private=False)
    return {'network_id': network_id}
Upload the model to NDEX