Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -190,7 +190,7 @@ def create_img1(imagep, text_overlay, color):
|
|
| 190 |
img = text_to_image(add_line_breaks(text_overlay, 13),"Poppins-Medium.ttf",100,color[8] )
|
| 191 |
img.save("outputtext.png", format="PNG")
|
| 192 |
|
| 193 |
-
text = cv2.imread('
|
| 194 |
text = cv2.resize(text,(0,0),None,1,1)
|
| 195 |
|
| 196 |
blue_channel, green_channel, red_channel, alpha_channel = cv2.split(text)
|
|
@@ -291,7 +291,7 @@ def create_img2(imagep, text_overlay, color):
|
|
| 291 |
img = text_to_image(add_line_breaks(text_overlay, 13),"Poppins-Medium.ttf",100,color[1] )
|
| 292 |
img.save("outputtext.png", format="PNG")
|
| 293 |
|
| 294 |
-
text = cv2.imread('
|
| 295 |
text = cv2.resize(text,(0,0),None,1,1)
|
| 296 |
|
| 297 |
blue_channel, green_channel, red_channel, alpha_channel = cv2.split(text)
|
|
|
|
| 190 |
img = text_to_image(add_line_breaks(text_overlay, 13),"Poppins-Medium.ttf",100,color[8] )
|
| 191 |
img.save("outputtext.png", format="PNG")
|
| 192 |
|
| 193 |
+
text = cv2.imread('outputtext.png',cv2.IMREAD_UNCHANGED)
|
| 194 |
text = cv2.resize(text,(0,0),None,1,1)
|
| 195 |
|
| 196 |
blue_channel, green_channel, red_channel, alpha_channel = cv2.split(text)
|
|
|
|
| 291 |
img = text_to_image(add_line_breaks(text_overlay, 13),"Poppins-Medium.ttf",100,color[1] )
|
| 292 |
img.save("outputtext.png", format="PNG")
|
| 293 |
|
| 294 |
+
text = cv2.imread('outputtext.png',cv2.IMREAD_UNCHANGED)
|
| 295 |
text = cv2.resize(text,(0,0),None,1,1)
|
| 296 |
|
| 297 |
blue_channel, green_channel, red_channel, alpha_channel = cv2.split(text)
|