Update app.py
Browse files
app.py
CHANGED
|
@@ -181,14 +181,14 @@ def change_product_angle_with_ai(image_path, angle_option):
|
|
| 181 |
return None, "Replicate API ํ ํฐ์ด ์ค์ ๋์ง ์์์ต๋๋ค."
|
| 182 |
|
| 183 |
try:
|
| 184 |
-
# ๊ฐ๋ ๋ณ๊ฒฝ ํ๋กฌํํธ ์ต์
|
| 185 |
angle_prompts = {
|
| 186 |
-
"์ผ์ชฝ 45๋": "Change the product angle to show it from 45-degree left side view, professional product photography, white background",
|
| 187 |
-
"์ค๋ฅธ์ชฝ 45๋": "Change the product angle to show it from 45-degree right side view, professional product photography, white background",
|
| 188 |
-
"์๋จ ์ต๊ธ": "Change to top-down angle view of the product, bird's eye view, professional product photography, white background",
|
| 189 |
-
"3/4 ๋ทฐ": "Change to 3/4 angle view of the product, three-quarter perspective, professional product photography, white background",
|
| 190 |
-
"์ ๋ฉด์์ ์ธก๋ฉด": "Change from front view to side view of the product, profile angle, professional product photography, white background",
|
| 191 |
-
"์ธก๋ฉด์์ ์ ๋ฉด": "Change from side view to front view of the product, frontal angle, professional product photography, white background"
|
| 192 |
}
|
| 193 |
|
| 194 |
selected_prompt = angle_prompts.get(angle_option, angle_prompts["3/4 ๋ทฐ"])
|
|
@@ -232,12 +232,12 @@ def process_with_ai_enhancement(image_path, prompt_option):
|
|
| 232 |
return None, "Replicate API ํ ํฐ์ด ์ค์ ๋์ง ์์์ต๋๋ค."
|
| 233 |
|
| 234 |
try:
|
| 235 |
-
# ํ๋กฌํํธ ์ต์
๋ณ ์ค์
|
| 236 |
prompts = {
|
| 237 |
-
"๊ธฐ๋ณธ ํ์งํฅ์": "Enhance image quality, make it more professional and crisp, white background",
|
| 238 |
-
"์ ํ ์ฌ์ง ์ต์ ํ": "Transform into professional product photography, clean white background, high quality, studio lighting",
|
| 239 |
-
"์ฟ ํก ์คํ์ผ": "Make it look like a professional e-commerce product photo for Korean online shopping, clean white background, perfect lighting",
|
| 240 |
-
"ํ๋ฆฌ๋ฏธ์ ๋๋": "Make it look premium and luxury, professional product shot, perfect white background, studio quality"
|
| 241 |
}
|
| 242 |
|
| 243 |
selected_prompt = prompts.get(prompt_option, prompts["๊ธฐ๋ณธ ํ์งํฅ์"])
|
|
|
|
| 181 |
return None, "Replicate API ํ ํฐ์ด ์ค์ ๋์ง ์์์ต๋๋ค."
|
| 182 |
|
| 183 |
try:
|
| 184 |
+
# ๊ฐ๋ ๋ณ๊ฒฝ ํ๋กฌํํธ ์ต์
(์์ ํ ํฐ์ ๋ฐฐ๊ฒฝ ๊ฐ์กฐ)
|
| 185 |
angle_prompts = {
|
| 186 |
+
"์ผ์ชฝ 45๋": "Change the product angle to show it from 45-degree left side view, professional product photography, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background",
|
| 187 |
+
"์ค๋ฅธ์ชฝ 45๋": "Change the product angle to show it from 45-degree right side view, professional product photography, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background",
|
| 188 |
+
"์๋จ ์ต๊ธ": "Change to top-down angle view of the product, bird's eye view, professional product photography, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background",
|
| 189 |
+
"3/4 ๋ทฐ": "Change to 3/4 angle view of the product, three-quarter perspective, professional product photography, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background",
|
| 190 |
+
"์ ๋ฉด์์ ์ธก๋ฉด": "Change from front view to side view of the product, profile angle, professional product photography, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background",
|
| 191 |
+
"์ธก๋ฉด์์ ์ ๋ฉด": "Change from side view to front view of the product, frontal angle, professional product photography, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background"
|
| 192 |
}
|
| 193 |
|
| 194 |
selected_prompt = angle_prompts.get(angle_option, angle_prompts["3/4 ๋ทฐ"])
|
|
|
|
| 232 |
return None, "Replicate API ํ ํฐ์ด ์ค์ ๋์ง ์์์ต๋๋ค."
|
| 233 |
|
| 234 |
try:
|
| 235 |
+
# ํ๋กฌํํธ ์ต์
๋ณ ์ค์ (์์ ํ ํฐ์ ๋ฐฐ๊ฒฝ ๊ฐ์กฐ)
|
| 236 |
prompts = {
|
| 237 |
+
"๊ธฐ๋ณธ ํ์งํฅ์": "Enhance image quality, make it more professional and crisp, pure white background #FFFFFF, clean white backdrop, no shadows, solid white background",
|
| 238 |
+
"์ ํ ์ฌ์ง ์ต์ ํ": "Transform into professional product photography, clean pure white background #FFFFFF, high quality, studio lighting, solid white backdrop, no shadows",
|
| 239 |
+
"์ฟ ํก ์คํ์ผ": "Make it look like a professional e-commerce product photo for Korean online shopping, clean pure white background #FFFFFF, perfect lighting, solid white backdrop, no shadows",
|
| 240 |
+
"ํ๋ฆฌ๋ฏธ์ ๋๋": "Make it look premium and luxury, professional product shot, perfect pure white background #FFFFFF, studio quality, clean white backdrop, no shadows, solid white background"
|
| 241 |
}
|
| 242 |
|
| 243 |
selected_prompt = prompts.get(prompt_option, prompts["๊ธฐ๋ณธ ํ์งํฅ์"])
|