Update app.py
Browse files
app.py
CHANGED
|
@@ -68,16 +68,14 @@ def change_product_angle(image_path):
|
|
| 68 |
return None, "Replicate API 토큰이 필요합니다."
|
| 69 |
|
| 70 |
try:
|
| 71 |
-
# Gen4 Image를 사용한 카메라 위치 변경
|
| 72 |
-
angle_prompt = "Professional product photography
|
| 73 |
|
| 74 |
output = replicate.run(
|
| 75 |
"runwayml/gen4-image",
|
| 76 |
input={
|
| 77 |
"prompt": angle_prompt,
|
| 78 |
-
"aspect_ratio": "1:1"
|
| 79 |
-
"reference_tags": ["product"],
|
| 80 |
-
"reference_images": [image_path]
|
| 81 |
}
|
| 82 |
)
|
| 83 |
|
|
@@ -96,16 +94,14 @@ def add_shadow_only(image_path):
|
|
| 96 |
return None, "Replicate API 토큰이 필요합니다."
|
| 97 |
|
| 98 |
try:
|
| 99 |
-
# Gen4 Image를 사용한 그림자 추가
|
| 100 |
-
shadow_prompt = "Professional product photography
|
| 101 |
|
| 102 |
output = replicate.run(
|
| 103 |
"runwayml/gen4-image",
|
| 104 |
input={
|
| 105 |
"prompt": shadow_prompt,
|
| 106 |
-
"aspect_ratio": "1:1"
|
| 107 |
-
"reference_tags": ["product"],
|
| 108 |
-
"reference_images": [image_path]
|
| 109 |
}
|
| 110 |
)
|
| 111 |
|
|
|
|
| 68 |
return None, "Replicate API 토큰이 필요합니다."
|
| 69 |
|
| 70 |
try:
|
| 71 |
+
# Gen4 Image를 사용한 카메라 위치 변경 (reference_images 제거)
|
| 72 |
+
angle_prompt = "Professional product photography from 45-degree side angle, three-quarter view, diagonal perspective, different camera position, clean background, e-commerce style product shot"
|
| 73 |
|
| 74 |
output = replicate.run(
|
| 75 |
"runwayml/gen4-image",
|
| 76 |
input={
|
| 77 |
"prompt": angle_prompt,
|
| 78 |
+
"aspect_ratio": "1:1"
|
|
|
|
|
|
|
| 79 |
}
|
| 80 |
)
|
| 81 |
|
|
|
|
| 94 |
return None, "Replicate API 토큰이 필요합니다."
|
| 95 |
|
| 96 |
try:
|
| 97 |
+
# Gen4 Image를 사용한 그림자 추가 (reference_images 제거)
|
| 98 |
+
shadow_prompt = "Professional product photography on pure white background with natural soft drop shadow, clean white backdrop, subtle shadow effect, e-commerce style, studio lighting"
|
| 99 |
|
| 100 |
output = replicate.run(
|
| 101 |
"runwayml/gen4-image",
|
| 102 |
input={
|
| 103 |
"prompt": shadow_prompt,
|
| 104 |
+
"aspect_ratio": "1:1"
|
|
|
|
|
|
|
| 105 |
}
|
| 106 |
)
|
| 107 |
|