How to use the netron.start function in netron

To help you get started, we’ve selected a few netron examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / OLive / web / backend / app.py View on Github external
def visualize():
    """
    Start netron with model from request.
    Returns:
        JSON response indicting success.
    """
    if request.method == 'POST':
        response_object = {'status': 'success'}
        temp_model = request.files['file']
        model_name = temp_model.filename

        request.files['file'].save(model_name)

        netron.start(model_name, browse=False, host='0.0.0.0')

    return jsonify(response_object)