Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ def generate_tags_and_description(prompt, gender_option, top_cat, sub_cat, speci
|
|
82 |
# Furry
|
83 |
tags["gender"] = "furry"
|
84 |
rule_text = (
|
85 |
-
GENDER_RULES.get("male", "") + "\n\n" #
|
86 |
+ GENDER_RULES.get("female", "") + "\n\n"
|
87 |
+ GENDER_RULES.get("intersex", "") + "\n\n"
|
88 |
+ GENDER_RULES.get("genderless", "")
|
@@ -116,9 +116,10 @@ def generate_tags_and_description(prompt, gender_option, top_cat, sub_cat, speci
|
|
116 |
system_prompt = (
|
117 |
"You are a creative assistant that generates detailed and imaginative scene descriptions "
|
118 |
"for AI generation prompts. Focus on the details provided, incorporate them into a cohesive narrative, "
|
119 |
-
"and follow these
|
120 |
f"{rule_text}\n\n"
|
121 |
-
"When you respond, do not exceed
|
|
|
122 |
)
|
123 |
|
124 |
# Chat
|
@@ -178,12 +179,12 @@ def translate_text(content, lang, api_mode, api_key):
|
|
178 |
##############################################################################
|
179 |
def build_interface():
|
180 |
with gr.Blocks() as demo:
|
181 |
-
gr.Markdown("## Prompt
|
182 |
|
183 |
with gr.Row():
|
184 |
with gr.Column():
|
185 |
api_mode = gr.Radio(
|
186 |
-
label="选择API (GPT or DeepSeek)",
|
187 |
choices=["GPT", "DeepSeek"],
|
188 |
value="GPT"
|
189 |
)
|
@@ -268,13 +269,13 @@ def build_interface():
|
|
268 |
lines=4
|
269 |
)
|
270 |
output_result = gr.Textbox(
|
271 |
-
label="(tags + 自然语言描述)",
|
272 |
lines=10
|
273 |
)
|
274 |
|
275 |
with gr.Row():
|
276 |
translate_lang = gr.Dropdown(
|
277 |
-
label="翻译语言",
|
278 |
choices=["English", "Chinese", "Japanese", "French", "German", "Spanish"],
|
279 |
value="English"
|
280 |
)
|
|
|
82 |
# Furry
|
83 |
tags["gender"] = "furry"
|
84 |
rule_text = (
|
85 |
+
GENDER_RULES.get("male", "") + "\n\n" # 根据自己的需求处理
|
86 |
+ GENDER_RULES.get("female", "") + "\n\n"
|
87 |
+ GENDER_RULES.get("intersex", "") + "\n\n"
|
88 |
+ GENDER_RULES.get("genderless", "")
|
|
|
116 |
system_prompt = (
|
117 |
"You are a creative assistant that generates detailed and imaginative scene descriptions "
|
118 |
"for AI generation prompts. Focus on the details provided, incorporate them into a cohesive narrative, "
|
119 |
+
"and follow these rules:\n\n"
|
120 |
f"{rule_text}\n\n"
|
121 |
+
"When you respond, do not exceed six sentences or less than three sentences.
|
122 |
+
Return your final text in English in the format of "tags \n Nature Language description".\n"
|
123 |
)
|
124 |
|
125 |
# Chat
|
|
|
179 |
##############################################################################
|
180 |
def build_interface():
|
181 |
with gr.Blocks() as demo:
|
182 |
+
gr.Markdown("## Prompt Transformer 提示词性别物种转换器 (GPT/DeepSeek)")
|
183 |
|
184 |
with gr.Row():
|
185 |
with gr.Column():
|
186 |
api_mode = gr.Radio(
|
187 |
+
label="Choose which API you would like to use -- 选择API (GPT or DeepSeek)",
|
188 |
choices=["GPT", "DeepSeek"],
|
189 |
value="GPT"
|
190 |
)
|
|
|
269 |
lines=4
|
270 |
)
|
271 |
output_result = gr.Textbox(
|
272 |
+
label="(tags + Descriptions (自然语言描述))",
|
273 |
lines=10
|
274 |
)
|
275 |
|
276 |
with gr.Row():
|
277 |
translate_lang = gr.Dropdown(
|
278 |
+
label="翻译语言 Language Translation",
|
279 |
choices=["English", "Chinese", "Japanese", "French", "German", "Spanish"],
|
280 |
value="English"
|
281 |
)
|