Spaces:
Running on Zero
Running on Zero
Tianshuo-Xu commited on
Commit ·
5dc8b08
1
Parent(s): 5eece5b
Set Wen Zhengming and his text as default input
Browse files
app.py
CHANGED
|
@@ -367,8 +367,8 @@ with gr.Blocks(title="UniCalli - Chinese Calligraphy Generator / 中国书法生
|
|
| 367 |
|
| 368 |
text_input = gr.Textbox(
|
| 369 |
label="输入文本 / Input Text (1-7个字符 / 1-7 characters)",
|
| 370 |
-
placeholder="请输入1-7个汉字 / Enter 1-7 Chinese characters, e.g.:
|
| 371 |
-
value="
|
| 372 |
max_lines=1
|
| 373 |
)
|
| 374 |
|
|
@@ -377,12 +377,12 @@ with gr.Blocks(title="UniCalli - Chinese Calligraphy Generator / 中国书法生
|
|
| 377 |
author_dropdown = gr.Dropdown(
|
| 378 |
label="1. 选择书法家 / Select Calligrapher",
|
| 379 |
choices=["None (Synthetic / 合成风格)"] + AUTHOR_LIST,
|
| 380 |
-
value="
|
| 381 |
info="先选择历史书法家 / Choose a historical calligrapher first"
|
| 382 |
)
|
| 383 |
|
| 384 |
-
# Get initial fonts for default author (
|
| 385 |
-
initial_author = "
|
| 386 |
initial_fonts = AUTHOR_FONTS.get(initial_author, ["楷", "草", "行"])
|
| 387 |
initial_font_choices = [FONT_STYLE_NAMES[f] for f in initial_fonts if f in FONT_STYLE_NAMES]
|
| 388 |
# Default to first available font for the author
|
|
|
|
| 367 |
|
| 368 |
text_input = gr.Textbox(
|
| 369 |
label="输入文本 / Input Text (1-7个字符 / 1-7 characters)",
|
| 370 |
+
placeholder="请输入1-7个汉字 / Enter 1-7 Chinese characters, e.g.: 相见时难别亦难",
|
| 371 |
+
value="相见时难别亦难",
|
| 372 |
max_lines=1
|
| 373 |
)
|
| 374 |
|
|
|
|
| 377 |
author_dropdown = gr.Dropdown(
|
| 378 |
label="1. 选择书法家 / Select Calligrapher",
|
| 379 |
choices=["None (Synthetic / 合成风格)"] + AUTHOR_LIST,
|
| 380 |
+
value="文征明",
|
| 381 |
info="先选择历史书法家 / Choose a historical calligrapher first"
|
| 382 |
)
|
| 383 |
|
| 384 |
+
# Get initial fonts for default author (文征明)
|
| 385 |
+
initial_author = "文征明"
|
| 386 |
initial_fonts = AUTHOR_FONTS.get(initial_author, ["楷", "草", "行"])
|
| 387 |
initial_font_choices = [FONT_STYLE_NAMES[f] for f in initial_fonts if f in FONT_STYLE_NAMES]
|
| 388 |
# Default to first available font for the author
|