Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -342,22 +342,22 @@ def gradio_interface():
|
|
| 342 |
# 左侧:文件上传、参数选择、排除/自定义输入
|
| 343 |
with gr.Column(scale=1):
|
| 344 |
api_key_input = gr.Textbox(
|
| 345 |
-
label="OpenAI API Key (
|
| 346 |
placeholder="sk-...",
|
| 347 |
type="password"
|
| 348 |
)
|
| 349 |
|
| 350 |
deepseek_key_input = gr.Textbox(
|
| 351 |
-
label="DeepSeek API Key (
|
| 352 |
placeholder="sk-...",
|
| 353 |
type="password"
|
| 354 |
)
|
| 355 |
|
| 356 |
use_deepseek = gr.Checkbox(label="Use DeepSeek API")
|
| 357 |
-
dtr_enabled = gr.Checkbox(label="Enable DTR (
|
| 358 |
|
| 359 |
with gr.Group():
|
| 360 |
-
gr.Markdown("
|
| 361 |
action_file = gr.File(label="Action File", file_types=[".txt"])
|
| 362 |
style_file = gr.File(label="Style File", file_types=[".txt"])
|
| 363 |
artist_files = gr.Files(label="Artist Files", file_types=[".txt"])
|
|
@@ -378,7 +378,7 @@ def gradio_interface():
|
|
| 378 |
)
|
| 379 |
|
| 380 |
with gr.Group():
|
| 381 |
-
gr.Markdown("
|
| 382 |
expression_count = gr.Slider(label="Number of Expressions", minimum=0, maximum=10, step=1, value=1)
|
| 383 |
item_count = gr.Slider(label="Number of Items", minimum=0, maximum=10, step=1, value=1)
|
| 384 |
detail_count = gr.Slider(label="Number of Other Details", minimum=0, maximum=10, step=1, value=1)
|
|
@@ -395,19 +395,19 @@ def gradio_interface():
|
|
| 395 |
|
| 396 |
tags_output = gr.Textbox(
|
| 397 |
label="Generated Tags",
|
| 398 |
-
placeholder="
|
| 399 |
lines=4,
|
| 400 |
interactive=True
|
| 401 |
)
|
| 402 |
description_output = gr.Textbox(
|
| 403 |
label="Generated Description",
|
| 404 |
-
placeholder="
|
| 405 |
lines=4,
|
| 406 |
interactive=True
|
| 407 |
)
|
| 408 |
combined_output = gr.Textbox(
|
| 409 |
label="Combined Output: Tags + Description",
|
| 410 |
-
placeholder="
|
| 411 |
lines=6
|
| 412 |
)
|
| 413 |
|
|
|
|
| 342 |
# 左侧:文件上传、参数选择、排除/自定义输入
|
| 343 |
with gr.Column(scale=1):
|
| 344 |
api_key_input = gr.Textbox(
|
| 345 |
+
label="OpenAI API Key (optional-可选)",
|
| 346 |
placeholder="sk-...",
|
| 347 |
type="password"
|
| 348 |
)
|
| 349 |
|
| 350 |
deepseek_key_input = gr.Textbox(
|
| 351 |
+
label="DeepSeek API Key (optional-可选)",
|
| 352 |
placeholder="sk-...",
|
| 353 |
type="password"
|
| 354 |
)
|
| 355 |
|
| 356 |
use_deepseek = gr.Checkbox(label="Use DeepSeek API")
|
| 357 |
+
dtr_enabled = gr.Checkbox(label="Enable DTR (当前无效-now plz ignore this)")
|
| 358 |
|
| 359 |
with gr.Group():
|
| 360 |
+
gr.Markdown("**upload your wildcards(optional)--上传文件 (可选):**")
|
| 361 |
action_file = gr.File(label="Action File", file_types=[".txt"])
|
| 362 |
style_file = gr.File(label="Style File", file_types=[".txt"])
|
| 363 |
artist_files = gr.Files(label="Artist Files", file_types=[".txt"])
|
|
|
|
| 378 |
)
|
| 379 |
|
| 380 |
with gr.Group():
|
| 381 |
+
gr.Markdown("**Set the Number of the random counts--随机数量设置:**")
|
| 382 |
expression_count = gr.Slider(label="Number of Expressions", minimum=0, maximum=10, step=1, value=1)
|
| 383 |
item_count = gr.Slider(label="Number of Items", minimum=0, maximum=10, step=1, value=1)
|
| 384 |
detail_count = gr.Slider(label="Number of Other Details", minimum=0, maximum=10, step=1, value=1)
|
|
|
|
| 395 |
|
| 396 |
tags_output = gr.Textbox(
|
| 397 |
label="Generated Tags",
|
| 398 |
+
placeholder="Waiting for generate-等待生成...",
|
| 399 |
lines=4,
|
| 400 |
interactive=True
|
| 401 |
)
|
| 402 |
description_output = gr.Textbox(
|
| 403 |
label="Generated Description",
|
| 404 |
+
placeholder="Waiting for generate-等待生成...",
|
| 405 |
lines=4,
|
| 406 |
interactive=True
|
| 407 |
)
|
| 408 |
combined_output = gr.Textbox(
|
| 409 |
label="Combined Output: Tags + Description",
|
| 410 |
+
placeholder="Waiting for generate-等待生成...",
|
| 411 |
lines=6
|
| 412 |
)
|
| 413 |
|