Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ ILLUMINATION_OPTIONS = {
|
|
90 |
|
91 |
# Lighting direction options
|
92 |
DIRECTION_OPTIONS = {
|
93 |
-
"
|
94 |
"left side": "Position the light source from the left side of the frame, creating shadows falling to the right.",
|
95 |
"right side": "Position the light source from the right side of the frame, creating shadows falling to the left.",
|
96 |
"top": "Position the light source from directly above, creating downward shadows.",
|
@@ -109,8 +109,8 @@ def infer(input_image, prompt, illumination_dropdown, direction_dropdown, seed=4
|
|
109 |
|
110 |
input_image = input_image.convert("RGB")
|
111 |
|
112 |
-
# Combine illumination and direction if direction is not "
|
113 |
-
if direction_dropdown != "
|
114 |
prompt_prefix = f"with {illumination_dropdown} coming from the {direction_dropdown} of the image"
|
115 |
else:
|
116 |
prompt_prefix = f"with {illumination_dropdown} coming from the {direction_dropdown} of the image"
|
|
|
90 |
|
91 |
# Lighting direction options
|
92 |
DIRECTION_OPTIONS = {
|
93 |
+
"auto": "",
|
94 |
"left side": "Position the light source from the left side of the frame, creating shadows falling to the right.",
|
95 |
"right side": "Position the light source from the right side of the frame, creating shadows falling to the left.",
|
96 |
"top": "Position the light source from directly above, creating downward shadows.",
|
|
|
109 |
|
110 |
input_image = input_image.convert("RGB")
|
111 |
|
112 |
+
# Combine illumination and direction if direction is not "auto"
|
113 |
+
if direction_dropdown != "auto":
|
114 |
prompt_prefix = f"with {illumination_dropdown} coming from the {direction_dropdown} of the image"
|
115 |
else:
|
116 |
prompt_prefix = f"with {illumination_dropdown} coming from the {direction_dropdown} of the image"
|