Preview:
with open(input_file_path, "rb") as f:
        response = requests.post(
            f"{BASE_URL}/{API_VERSION}/process?model_id={model_id}",
            headers=headers,
            files={"upload_data": (osp.basename(input_file_path), f)},
        )

    assert response.status_code == 201

    task_id = json.loads(response.content)["task_id"]

    result = repeated_get_task(access_token, task_id, repeat_result)
    assert result is not None

    visualization = repeated_get_task(
        access_token, task_id, repeat_visualization, visualize=True,
    )
    assert bool(visualization)

    response = requests.get(visualization, headers=headers)
    assert response.status_code == 200

    if check_is_equal:
        assert is_equal(result, output_file, error=0.3)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter