Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def generate_prompts(user_input, csv_prompts, prefix, num_examples=3, language='
|
|
23 |
system_prompt = (
|
24 |
f"你是一位自然诗人,请将以下内容转化为{'英文' if language == 'English' else '中文'}的风景描写。"
|
25 |
"请确保风格与提供的 CSV 中的描述一致,并以统一前缀 '{prefix}' 开头。"
|
26 |
-
"请生成 {num_examples}
|
27 |
)
|
28 |
|
29 |
# 拼接用户输入和 CSV 内容
|
@@ -92,8 +92,8 @@ with gr.Blocks(title="提示词生成器", theme=gr.themes.Soft()) as app:
|
|
92 |
# 示例数据
|
93 |
examples = gr.Examples(
|
94 |
examples=[
|
95 |
-
["
|
96 |
-
["
|
97 |
],
|
98 |
inputs=[input_text],
|
99 |
label="点击试试示例"
|
|
|
23 |
system_prompt = (
|
24 |
f"你是一位自然诗人,请将以下内容转化为{'英文' if language == 'English' else '中文'}的风景描写。"
|
25 |
"请确保风格与提供的 CSV 中的描述一致,并以统一前缀 '{prefix}' 开头。"
|
26 |
+
"请生成 {num_examples} 条不同风格的结果,每条结果不要加编号,且保持简洁自然。注意:输出语言必须与要求一致。"
|
27 |
)
|
28 |
|
29 |
# 拼接用户输入和 CSV 内容
|
|
|
92 |
# 示例数据
|
93 |
examples = gr.Examples(
|
94 |
examples=[
|
95 |
+
["用英文描述,清晨的阳光洒在湖面上"],
|
96 |
+
["保留角色性别和外貌,用英文,描述角色的动作场面"]
|
97 |
],
|
98 |
inputs=[input_text],
|
99 |
label="点击试试示例"
|