Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,7 @@ def generate_text_image_with_pil(old_text, input_token, new_token, image_width=4
|
|
| 72 |
draw = ImageDraw.Draw(img)
|
| 73 |
|
| 74 |
# Load font
|
| 75 |
-
font_path = "
|
| 76 |
font = ImageFont.truetype(font_path, font_size)
|
| 77 |
|
| 78 |
# Draw text
|
|
@@ -115,8 +115,7 @@ from PIL import Image, ImageDraw, ImageFont
|
|
| 115 |
|
| 116 |
def render_next_token_table_image(table_data, predict_token, image_width=500, row_height=40, font_size=14):
|
| 117 |
# Cài đặt font hỗ trợ đa ngôn ngữ (sửa đường dẫn nếu cần)
|
| 118 |
-
|
| 119 |
-
font_path = "/usr/share/fonts/truetype/noto/NotoSansCJK-Regular.ttc"
|
| 120 |
|
| 121 |
font = ImageFont.truetype(font_path, font_size)
|
| 122 |
|
|
|
|
| 72 |
draw = ImageDraw.Draw(img)
|
| 73 |
|
| 74 |
# Load font
|
| 75 |
+
font_path = "NotoSansCJK-Regular.ttc"
|
| 76 |
font = ImageFont.truetype(font_path, font_size)
|
| 77 |
|
| 78 |
# Draw text
|
|
|
|
| 115 |
|
| 116 |
def render_next_token_table_image(table_data, predict_token, image_width=500, row_height=40, font_size=14):
|
| 117 |
# Cài đặt font hỗ trợ đa ngôn ngữ (sửa đường dẫn nếu cần)
|
| 118 |
+
font_path = "NotoSansCJK-Regular.ttc"
|
|
|
|
| 119 |
|
| 120 |
font = ImageFont.truetype(font_path, font_size)
|
| 121 |
|