Commit ·
b7e96b9
1
Parent(s): d1eea16
Removed transparent background
Browse files
app.py
CHANGED
|
@@ -14,8 +14,8 @@ model = Model()
|
|
| 14 |
|
| 15 |
|
| 16 |
def run(image_path, threshold):
|
| 17 |
-
image = Image.open(image_path).convert('
|
| 18 |
-
canvas = Image.new('
|
| 19 |
|
| 20 |
# We copy the image that and fill it with black, to get the dimensions
|
| 21 |
rgb = np.array(canvas)
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
def run(image_path, threshold):
|
| 17 |
+
image = Image.open(image_path).convert('RGB')
|
| 18 |
+
canvas = Image.new('RGB', image.size, (0, 0, 0))
|
| 19 |
|
| 20 |
# We copy the image that and fill it with black, to get the dimensions
|
| 21 |
rgb = np.array(canvas)
|