linoyts HF Staff commited on
Commit
825b8ff
·
verified ·
1 Parent(s): 738b0d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -111,9 +111,9 @@ def infer(input_image, prompt, illumination_dropdown, direction_dropdown, seed=4
111
 
112
  # Combine illumination and direction if direction is not "Auto"
113
  if direction_dropdown != "none":
114
- prompt_prefix = f"with {illumination_dropdown} coming from the {direction_dropdown}"
115
  else:
116
- prompt_prefix = f"with {illumination_dropdown} coming from the {direction_dropdown}"
117
 
118
  prompt_with_template = f"Relight the image, {prompt_prefix}. {prompt} Maintain the identity of the foreground subjects."
119
 
@@ -153,9 +153,7 @@ with gr.Blocks(css=css) as demo:
153
  with gr.Column():
154
  input_image = gr.Image(label="Upload the image for relighting", type="pil")
155
 
156
- with gr.Row():
157
-
158
- prompt = gr.Textbox(
159
  label="Prompt",
160
  show_label=True,
161
  max_lines=3,
@@ -163,6 +161,7 @@ with gr.Blocks(css=css) as demo:
163
  value="Add directional sunlight from window source. Increase brightness on lit areas. Create hard shadows with sharp edges. Set warm white color temperature. Add visible light rays and dust particles in beams.",
164
  container=True
165
  )
 
166
 
167
  illumination_dropdown = gr.Dropdown(
168
  choices=list(ILLUMINATION_OPTIONS.keys()) + ["custom"],
 
111
 
112
  # Combine illumination and direction if direction is not "Auto"
113
  if direction_dropdown != "none":
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"
117
 
118
  prompt_with_template = f"Relight the image, {prompt_prefix}. {prompt} Maintain the identity of the foreground subjects."
119
 
 
153
  with gr.Column():
154
  input_image = gr.Image(label="Upload the image for relighting", type="pil")
155
 
156
+ prompt = gr.Textbox(
 
 
157
  label="Prompt",
158
  show_label=True,
159
  max_lines=3,
 
161
  value="Add directional sunlight from window source. Increase brightness on lit areas. Create hard shadows with sharp edges. Set warm white color temperature. Add visible light rays and dust particles in beams.",
162
  container=True
163
  )
164
+ with gr.Row():
165
 
166
  illumination_dropdown = gr.Dropdown(
167
  choices=list(ILLUMINATION_OPTIONS.keys()) + ["custom"],