From d614022b59622fb383bdcff74f894a8a743720e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Mart=C3=ADnez?= Date: Tue, 26 Dec 2023 22:59:57 -0300 Subject: [PATCH] Manage error with fixed font --- text_generation/generate_random_text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text_generation/generate_random_text.py b/text_generation/generate_random_text.py index 5eab22b..bd5b303 100644 --- a/text_generation/generate_random_text.py +++ b/text_generation/generate_random_text.py @@ -31,7 +31,7 @@ for i in range(NUM_IMAGES): string.digits, k=NUM_CHARACTERS)) text_color = random.choices(["black","white"], weights=(70, 30), k=1)[0] - background_color = random.choices(["black","white"], weights=(30, 70), k=1)[0] + background_color = "black"*(text_color=="white") + "white"*(text_color=="black") generate_random_txt_img(text, IMG_SHAPE,