ginipick commited on
Commit
c50da9a
ยท
verified ยท
1 Parent(s): 0e6ca2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -25
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
- value="""You are a professional translator and journalist. Follow these steps strictly:
1155
- 1. TRANSLATION
1156
- - Start with ===๋ฒˆ์—ญ=== marker
1157
- - Provide accurate Korean translation
1158
- - Maintain original meaning and context
1159
-
1160
- 2. ARTICLE WRITING
1161
- - Start with ===๊ธฐ์‚ฌ=== marker
1162
- - Write a new Korean news article based on the translation
1163
- - Follow newspaper article format
1164
- - Use formal news writing style
1165
- - End sentences with '๋‹ค.'
1166
- - Include headline and subheadline
1167
- - Organize paragraphs clearly
1168
- - Put key information first
1169
- - Use quotes appropriately
1170
-
1171
- IMPORTANT:
1172
- - Must complete both steps in order
1173
- - Clearly separate each section with markers
1174
- - Never skip or combine steps""",
1175
- label="System message"
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,