Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -333,7 +333,7 @@ def gradio_interface():
|
|
| 333 |
定义 Gradio 应用界面。
|
| 334 |
"""
|
| 335 |
with gr.Blocks() as demo:
|
| 336 |
-
gr.Markdown("## Random Prompt Generator with Adjustable
|
| 337 |
|
| 338 |
# 用于存储收藏内容的状态(最多缓存3条)
|
| 339 |
favorites_state = gr.State([])
|
|
@@ -369,12 +369,12 @@ def gradio_interface():
|
|
| 369 |
)
|
| 370 |
|
| 371 |
excluded_tags = gr.Textbox(
|
| 372 |
-
label="排除 Tags (逗号分隔)",
|
| 373 |
-
placeholder="如:angry, sword"
|
| 374 |
)
|
| 375 |
user_custom_tags = gr.Textbox(
|
| 376 |
-
label="自定义附加 Tags (逗号分隔)",
|
| 377 |
-
placeholder="如:glowing eyes, giant wings"
|
| 378 |
)
|
| 379 |
|
| 380 |
with gr.Group():
|
|
@@ -417,22 +417,23 @@ def gradio_interface():
|
|
| 417 |
# 翻译相关
|
| 418 |
with gr.Row():
|
| 419 |
target_language = gr.Dropdown(
|
| 420 |
-
choices=["English", "Chinese", "Japanese"
|
|
|
|
| 421 |
value="English",
|
| 422 |
-
label="Target Language"
|
| 423 |
)
|
| 424 |
translate_button = gr.Button("Translate to selected language")
|
| 425 |
translated_output = gr.Textbox(
|
| 426 |
label="Translated Output",
|
| 427 |
-
placeholder="
|
| 428 |
lines=6
|
| 429 |
)
|
| 430 |
|
| 431 |
# 收藏
|
| 432 |
with gr.Row():
|
| 433 |
-
favorite_button = gr.Button("
|
| 434 |
favorites_box = gr.Textbox(
|
| 435 |
-
label="
|
| 436 |
placeholder="暂无收藏",
|
| 437 |
lines=6
|
| 438 |
)
|
|
|
|
| 333 |
定义 Gradio 应用界面。
|
| 334 |
"""
|
| 335 |
with gr.Blocks() as demo:
|
| 336 |
+
gr.Markdown("## 【RPGAT】Random Prompt Generator with Adjustable Tags (V2)")
|
| 337 |
|
| 338 |
# 用于存储收藏内容的状态(最多缓存3条)
|
| 339 |
favorites_state = gr.State([])
|
|
|
|
| 369 |
)
|
| 370 |
|
| 371 |
excluded_tags = gr.Textbox(
|
| 372 |
+
label="排除excluded Tags (逗号分隔)",
|
| 373 |
+
placeholder="As如:angry, sword"
|
| 374 |
)
|
| 375 |
user_custom_tags = gr.Textbox(
|
| 376 |
+
label="自定义附加custom addition Tags (逗号分隔)",
|
| 377 |
+
placeholder="As如:glowing eyes, giant wings"
|
| 378 |
)
|
| 379 |
|
| 380 |
with gr.Group():
|
|
|
|
| 417 |
# 翻译相关
|
| 418 |
with gr.Row():
|
| 419 |
target_language = gr.Dropdown(
|
| 420 |
+
choices=["English", "Chinese", "Arabic (language)", "Japanese", "Persian (language)", "Italian (language)",
|
| 421 |
+
"Dutch (language)","Russian (language)","German (language)"],
|
| 422 |
value="English",
|
| 423 |
+
label="Target Language-目标语言"
|
| 424 |
)
|
| 425 |
translate_button = gr.Button("Translate to selected language")
|
| 426 |
translated_output = gr.Textbox(
|
| 427 |
label="Translated Output",
|
| 428 |
+
placeholder="Waiting for the result of Translation--等待翻译...",
|
| 429 |
lines=6
|
| 430 |
)
|
| 431 |
|
| 432 |
# 收藏
|
| 433 |
with gr.Row():
|
| 434 |
+
favorite_button = gr.Button("Favorites this result-收藏本次结果")
|
| 435 |
favorites_box = gr.Textbox(
|
| 436 |
+
label="Favorites Folder (MAX-Save 3 tags-- 最多 3 条)",
|
| 437 |
placeholder="暂无收藏",
|
| 438 |
lines=6
|
| 439 |
)
|