Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -1139,7 +1139,8 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI ์๋น
|
|
1139 |
# AI ๋ฒ์ญ ํญ ์ถ๊ฐ
|
1140 |
with gr.Tab("AI ๊ธฐ์ฌ ์์ฑ"):
|
1141 |
gr.Markdown("๋ด์ค URL์ ์
๋ ฅํ๋ฉด AI๊ฐ ํ๊ตญ์ด๋ก ๋ฒ์ญํ์ฌ ๊ธฐ์ฌ ํ์์ผ๋ก ์์ฑํฉ๋๋ค.")
|
1142 |
-
|
|
|
1143 |
with gr.Column():
|
1144 |
chatbot = gr.Chatbot(height=600)
|
1145 |
|
@@ -1148,32 +1149,46 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI ์๋น
|
|
1148 |
label="๋ด์ค URL",
|
1149 |
placeholder="https://..."
|
1150 |
)
|
1151 |
-
|
1152 |
with gr.Accordion("๊ณ ๊ธ ์ค์ ", open=False):
|
|
|
1153 |
system_message = gr.Textbox(
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1177 |
|
1178 |
max_tokens = gr.Slider(
|
1179 |
minimum=1,
|
|
|
1139 |
# AI ๋ฒ์ญ ํญ ์ถ๊ฐ
|
1140 |
with gr.Tab("AI ๊ธฐ์ฌ ์์ฑ"):
|
1141 |
gr.Markdown("๋ด์ค URL์ ์
๋ ฅํ๋ฉด AI๊ฐ ํ๊ตญ์ด๋ก ๋ฒ์ญํ์ฌ ๊ธฐ์ฌ ํ์์ผ๋ก ์์ฑํฉ๋๋ค.")
|
1142 |
+
gr.Markdown("์ด๋ฏธ์ง ์์ฑ: https://huggingface.co/spaces/ginipick/FLUXllama ")
|
1143 |
+
|
1144 |
with gr.Column():
|
1145 |
chatbot = gr.Chatbot(height=600)
|
1146 |
|
|
|
1149 |
label="๋ด์ค URL",
|
1150 |
placeholder="https://..."
|
1151 |
)
|
1152 |
+
|
1153 |
with gr.Accordion("๊ณ ๊ธ ์ค์ ", open=False):
|
1154 |
+
|
1155 |
system_message = gr.Textbox(
|
1156 |
+
value="""You are a professional translator and journalist. Follow these steps strictly:
|
1157 |
+
1. TRANSLATION
|
1158 |
+
- Start with ===๋ฒ์ญ=== marker
|
1159 |
+
- Provide accurate Korean translation
|
1160 |
+
- Maintain original meaning and context
|
1161 |
+
|
1162 |
+
2. ARTICLE WRITING
|
1163 |
+
- Start with ===๊ธฐ์ฌ=== marker
|
1164 |
+
- Write a new Korean news article based on the translation
|
1165 |
+
- Follow newspaper article format
|
1166 |
+
- Use formal news writing style
|
1167 |
+
- End sentences with '๋ค.'
|
1168 |
+
- Include headline and subheadline
|
1169 |
+
- Organize paragraphs clearly
|
1170 |
+
- Put key information first
|
1171 |
+
- Use quotes appropriately
|
1172 |
+
|
1173 |
+
3. IMAGE PROMPT GENERATION
|
1174 |
+
- Start with ===์ด๋ฏธ์ง ํ๋กฌํํธ=== marker
|
1175 |
+
- Create detailed Korean prompts for image generation
|
1176 |
+
- Prompts should reflect the article's main theme and content
|
1177 |
+
- Include key visual elements mentioned in the article
|
1178 |
+
- Specify style, mood, and composition
|
1179 |
+
- Format: "์ด๋ฏธ์ง ์ค๋ช
: [์์ธ ์ค๋ช
]"
|
1180 |
+
- Add style keywords: "์คํ์ผ: [๊ด๋ จ ํค์๋๋ค]"
|
1181 |
+
- Add mood keywords: "๋ถ์๊ธฐ: [๊ด๋ จ ํค์๋๋ค]"
|
1182 |
+
|
1183 |
+
IMPORTANT:
|
1184 |
+
- Must complete all three steps in order
|
1185 |
+
- Clearly separate each section with markers
|
1186 |
+
- Never skip or combine steps
|
1187 |
+
- Ensure image prompts align with article content""",
|
1188 |
+
label="System message"
|
1189 |
+
)
|
1190 |
+
|
1191 |
+
|
1192 |
|
1193 |
max_tokens = gr.Slider(
|
1194 |
minimum=1,
|