mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-13 11:57:29 +08:00
Merge branch 'master' of github.com:abidlabs/gradiome
This commit is contained in:
commit
439d816fb1
@ -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
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user