Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -99,7 +99,6 @@ def infer(input_image, prompt, illumination_dropdown, seed=42, randomize_seed=Fa
|
|
99 |
|
100 |
input_image = input_image.convert("RGB")
|
101 |
|
102 |
-
# Use the prompt directly (it will be set by button clicks or manual input)
|
103 |
prompt_with_template = f"Relight the image, {prompt}. Focus on how the new lighting affects shadows, highlights, color temperature, and overall mood of the scene.Maintain the identiity of the forground subjects"
|
104 |
|
105 |
image = pipe(
|
@@ -145,7 +144,7 @@ with gr.Blocks(css=css) as demo:
|
|
145 |
value="bright natural sunlight streaming through a window, creating warm golden beams and soft shadows across the scene, with high contrast between lit and shadowed areas",
|
146 |
container=True
|
147 |
)
|
148 |
-
|
149 |
illumination_dropdown = gr.Dropdown(
|
150 |
choices=list(ILLUMINATION_OPTIONS.keys()) + ["Custom"],
|
151 |
value="sunshine from window",
|
@@ -180,7 +179,7 @@ with gr.Blocks(css=css) as demo:
|
|
180 |
with gr.Column():
|
181 |
result = gr.Image(label="Result", show_label=False, interactive=False)
|
182 |
|
183 |
-
#
|
184 |
illumination_dropdown.change(
|
185 |
fn=update_prompt_from_dropdown,
|
186 |
inputs=[illumination_dropdown],
|
|
|
99 |
|
100 |
input_image = input_image.convert("RGB")
|
101 |
|
|
|
102 |
prompt_with_template = f"Relight the image, {prompt}. Focus on how the new lighting affects shadows, highlights, color temperature, and overall mood of the scene.Maintain the identiity of the forground subjects"
|
103 |
|
104 |
image = pipe(
|
|
|
144 |
value="bright natural sunlight streaming through a window, creating warm golden beams and soft shadows across the scene, with high contrast between lit and shadowed areas",
|
145 |
container=True
|
146 |
)
|
147 |
+
|
148 |
illumination_dropdown = gr.Dropdown(
|
149 |
choices=list(ILLUMINATION_OPTIONS.keys()) + ["Custom"],
|
150 |
value="sunshine from window",
|
|
|
179 |
with gr.Column():
|
180 |
result = gr.Image(label="Result", show_label=False, interactive=False)
|
181 |
|
182 |
+
# update prompt when dropdown changes
|
183 |
illumination_dropdown.change(
|
184 |
fn=update_prompt_from_dropdown,
|
185 |
inputs=[illumination_dropdown],
|