linoyts HF Staff commited on
Commit
65c19a1
·
verified ·
1 Parent(s): 1618f97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -68,7 +68,7 @@ def build_camera_prompt(rotate_deg, move_forward, vertical_tilt, wideangle):
68
 
69
 
70
  # Move forward / close-up
71
- if move_forward >= 5:
72
  prompt_parts.append("将镜头转为特写镜头 Turn the camera to a close-up.")
73
  elif move_forward >= 1:
74
  prompt_parts.append("将镜头向前移动 Move the camera forward.")
@@ -183,12 +183,12 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
183
 
184
  with gr.Row():
185
  with gr.Column():
186
- image = gr.Image(label="Input Image", type="pil", sources=["upload"])
187
  prev_output = gr.Image(value=None, visible=False)
188
  is_reset = gr.Checkbox(value=False, visible=False)
189
 
190
  with gr.Tab("Camera Controls"):
191
- rotate_deg = gr.Slider(label="Rotate Left–Right (degrees °)", minimum=-90, maximum=90, step=45, value=0)
192
  move_forward = gr.Slider(label="Move Forward → Close-Up", minimum=0, maximum=10, step=5, value=0)
193
  vertical_tilt = gr.Slider(label="Vertical Angle (Bird ↔ Worm)", minimum=-1, maximum=1, step=1, value=0)
194
  wideangle = gr.Checkbox(label="Wide-Angle Lens", value=False)
 
68
 
69
 
70
  # Move forward / close-up
71
+ if move_forward > 5:
72
  prompt_parts.append("将镜头转为特写镜头 Turn the camera to a close-up.")
73
  elif move_forward >= 1:
74
  prompt_parts.append("将镜头向前移动 Move the camera forward.")
 
183
 
184
  with gr.Row():
185
  with gr.Column():
186
+ image = gr.Image(label="Input Image", type="pil")
187
  prev_output = gr.Image(value=None, visible=False)
188
  is_reset = gr.Checkbox(value=False, visible=False)
189
 
190
  with gr.Tab("Camera Controls"):
191
+ rotate_deg = gr.Slider(label="Rotate Right-Left (degrees °)", minimum=-90, maximum=90, step=45, value=0)
192
  move_forward = gr.Slider(label="Move Forward → Close-Up", minimum=0, maximum=10, step=5, value=0)
193
  vertical_tilt = gr.Slider(label="Vertical Angle (Bird ↔ Worm)", minimum=-1, maximum=1, step=1, value=0)
194
  wideangle = gr.Checkbox(label="Wide-Angle Lens", value=False)