evalstate HF Staff commited on
Commit
30914aa
·
verified ·
1 Parent(s): 11dae74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -276,7 +276,8 @@ def create_video_between_images(
276
  input_image: Optional[Image.Image],
277
  output_image: Optional[np.ndarray],
278
  prompt: str,
279
- request: gr.Request
 
280
  ) -> str:
281
  """
282
  Create a short transition video between the input and output images via the
@@ -331,7 +332,7 @@ css = '''#col-container { max-width: 800px; margin: 0 auto; }
331
  #examples{max-width: 800px; margin: 0 auto; }'''
332
 
333
 
334
- def reset_all() -> list:
335
  """
336
  Reset all camera control knobs and flags to their default values.
337
 
@@ -350,7 +351,7 @@ def reset_all() -> list:
350
  return [0, 0, 0, 0, False, True]
351
 
352
 
353
- def end_reset() -> bool:
354
  """
355
  Mark the end of a reset cycle.
356
 
@@ -365,7 +366,7 @@ def end_reset() -> bool:
365
 
366
 
367
  def update_dimensions_on_upload(
368
- image: Optional[Image.Image]
369
  ) -> Tuple[int, int]:
370
  """
371
  Compute recommended (width, height) for the output resolution when an
@@ -400,7 +401,7 @@ def update_dimensions_on_upload(
400
  return new_width, new_height
401
 
402
 
403
- with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
404
  with gr.Column(elem_id="col-container"):
405
  gr.Markdown("## 🎬 Qwen Image Edit — Camera Angle Control")
406
  gr.Markdown("""
@@ -594,6 +595,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
594
  def maybe_infer(
595
  is_reset: bool,
596
  progress: gr.Progress = gr.Progress(track_tqdm=True),
 
597
  *args: Any
598
  ):
599
  if is_reset:
 
276
  input_image: Optional[Image.Image],
277
  output_image: Optional[np.ndarray],
278
  prompt: str,
279
+ request: gr.Request,
280
+ api_name=False
281
  ) -> str:
282
  """
283
  Create a short transition video between the input and output images via the
 
332
  #examples{max-width: 800px; margin: 0 auto; }'''
333
 
334
 
335
+ def reset_all(api_name=False) -> list:
336
  """
337
  Reset all camera control knobs and flags to their default values.
338
 
 
351
  return [0, 0, 0, 0, False, True]
352
 
353
 
354
+ def end_reset(api,api_name=False) -> bool:
355
  """
356
  Mark the end of a reset cycle.
357
 
 
366
 
367
 
368
  def update_dimensions_on_upload(
369
+ image: Optional[Image.Image],api_name=False
370
  ) -> Tuple[int, int]:
371
  """
372
  Compute recommended (width, height) for the output resolution when an
 
401
  return new_width, new_height
402
 
403
 
404
+ with gr.Blocks(css=css) as demo:
405
  with gr.Column(elem_id="col-container"):
406
  gr.Markdown("## 🎬 Qwen Image Edit — Camera Angle Control")
407
  gr.Markdown("""
 
595
  def maybe_infer(
596
  is_reset: bool,
597
  progress: gr.Progress = gr.Progress(track_tqdm=True),
598
+ api_name=False
599
  *args: Any
600
  ):
601
  if is_reset: