diff --git a/gradio/components.py b/gradio/components.py index 88d26704659b5..b36c0aa628e67 100644 --- a/gradio/components.py +++ b/gradio/components.py @@ -1790,6 +1790,7 @@ def _segment_by_slic(self, x): compactness=10, sigma=1, start_label=1, + channel_axis=None ) except TypeError: # For skimage 0.16 and older segments_slic = slic( diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000000..22c84a15fd029 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +minversion = 3.7 +testpaths = test diff --git a/test/test_routes.py b/test/test_routes.py index 374a48fe3a902..62ed986134b5c 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -56,7 +56,7 @@ def test_get_config_route(self, test_client): def test_upload_route(self, test_client): response = test_client.post( - "/upload", files={"files": open("test/test_files/alphabet.txt", "r")} + "/upload", files={"files": open("test/test_files/alphabet.txt", "rb")} ) assert response.status_code == 200 file = response.json()[0]