xi0v Fabrice-TIERCELIN commited on
Commit
cbb0dad
1 Parent(s): fc98f8c

Show the right output (#27)

Browse files

- Show the right output (8551dbe9589c1ac0951c39f444c920881be718ed)


Co-authored-by: Fabrice TIERCELIN <[email protected]>

Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -68,7 +68,6 @@ def animate(
68
  if video_format == "gif":
69
  video_path = None
70
  gif_path = result_path
71
- video_format = None
72
  export_to_gif(image=frames, output_gif_path=gif_path, fps=fps_id)
73
  else:
74
  video_path = result_path
@@ -88,7 +87,7 @@ def animate(
88
  ((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + \
89
  str(secondes) + " sec."
90
 
91
- return gr.update(value=video_path, format=video_format), gr.update(value=gif_path, visible=video_format == "gif"), gr.update(value=result_path, visible=True), gr.update(label="Generated frames in *." + frame_format + " format", format = frame_format, value = frames, visible=True), seed, gr.update(value = information, visible = True), gr.update(visible=True)
92
 
93
  @spaces.GPU(duration=120)
94
  def animate_on_gpu(
 
68
  if video_format == "gif":
69
  video_path = None
70
  gif_path = result_path
 
71
  export_to_gif(image=frames, output_gif_path=gif_path, fps=fps_id)
72
  else:
73
  video_path = result_path
 
87
  ((str(minutes) + " min, ") if hours != 0 or minutes != 0 else "") + \
88
  str(secondes) + " sec."
89
 
90
+ return gr.update(value=video_path, format=video_format if video_format != "gif" else None, visible=video_format != "gif"), gr.update(value=gif_path, visible=video_format == "gif"), gr.update(value=result_path, visible=True), gr.update(label="Generated frames in *." + frame_format + " format", format = frame_format, value = frames, visible=True), seed, gr.update(value = information, visible = True), gr.update(visible=True)
91
 
92
  @spaces.GPU(duration=120)
93
  def animate_on_gpu(