diff --git a/gradio/preprocessing_utils.py b/gradio/preprocessing_utils.py index 9708b3e603..50d90bc856 100644 --- a/gradio/preprocessing_utils.py +++ b/gradio/preprocessing_utils.py @@ -22,9 +22,7 @@ def encode_array_to_base64(image_array): PIL_image = Image.fromarray(skimage.img_as_ubyte(image_array)) PIL_image.save(output_bytes, 'PNG') bytes_data = output_bytes.getvalue() - base64_str = str(base64.b64encode(bytes_data), 'utf-8') - return "data:image/png;base64," + base64_str diff --git a/test/test_networking.py b/test/test_networking.py index 3922db5222..0c89210752 100644 --- a/test/test_networking.py +++ b/test/test_networking.py @@ -41,7 +41,7 @@ class TestSetSampleData(unittest.TestCase): config_file = os.path.join(temp_dir, 'static/config.json') with open(config_file) as json_file: data = json.load(json_file) - self.assertFalse(test_array == data["sample_inputs"]) + self.assertTrue(test_array == data["sample_inputs"]) # class TestCopyFiles(unittest.TestCase): # def test_copy_files(self):