Spaces:
Running
Running
ChenyuRabbitLove
commited on
Commit
โข
c0fd726
1
Parent(s):
5102bf8
chore: modify reward image text width
Browse files
utils/completion_reward.py
CHANGED
@@ -493,7 +493,7 @@ class ImageProcessor:
|
|
493 |
|
494 |
# Draw the text
|
495 |
title_font = ImageFont.truetype("NotoSansTC-Bold.ttf", 36)
|
496 |
-
body_font = ImageFont.truetype("NotoSansTC-Light.ttf",
|
497 |
|
498 |
# Title text
|
499 |
title = f"ๅ
ๆๅฎ่ญท่
- {player_name} ็ๅ้ชๆ
ไบ"
|
@@ -504,7 +504,7 @@ class ImageProcessor:
|
|
504 |
body_x, body_y = left + 20, title_y + 60 # Adjust position as needed
|
505 |
|
506 |
for line in paragraph.split("\n"):
|
507 |
-
wrapped_lines = textwrap.wrap(line, width=
|
508 |
for wrapped_line in wrapped_lines:
|
509 |
draw.text((body_x, body_y), wrapped_line, font=body_font, fill="black")
|
510 |
body_y += 30
|
|
|
493 |
|
494 |
# Draw the text
|
495 |
title_font = ImageFont.truetype("NotoSansTC-Bold.ttf", 36)
|
496 |
+
body_font = ImageFont.truetype("NotoSansTC-Light.ttf", 14)
|
497 |
|
498 |
# Title text
|
499 |
title = f"ๅ
ๆๅฎ่ญท่
- {player_name} ็ๅ้ชๆ
ไบ"
|
|
|
504 |
body_x, body_y = left + 20, title_y + 60 # Adjust position as needed
|
505 |
|
506 |
for line in paragraph.split("\n"):
|
507 |
+
wrapped_lines = textwrap.wrap(line, width=70)
|
508 |
for wrapped_line in wrapped_lines:
|
509 |
draw.text((body_x, body_y), wrapped_line, font=body_font, fill="black")
|
510 |
body_y += 30
|