fffiloni commited on
Commit
b90115e
·
verified ·
1 Parent(s): 6081ae2

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +7 -4
gradio_app.py CHANGED
@@ -103,19 +103,22 @@ def infer(frame1_path, frame2_path):
103
  noise_injection_steps=noise_injection_steps, # 0
104
  noise_injection_ratio= noise_injection_ratio, # 0.5
105
  ).frames[0]
 
 
106
 
107
  out_dir = "result"
108
 
109
  check_outputs_folder(out_dir)
110
  os.makedirs(out_dir, exist_ok=True)
111
  out_path = "result/video_result.gif"
112
-
 
113
  if out_path.endswith('.gif'):
114
  frames[0].save(out_path, save_all=True, append_images=frames[1:], duration=142, loop=0)
115
  else:
116
  export_to_video(frames, out_path, fps=7)
117
-
118
- return out_path
119
 
120
  with gr.Blocks() as demo:
121
 
@@ -127,7 +130,7 @@ with gr.Blocks() as demo:
127
  image_input2 = gr.Image(type="filepath")
128
  submit_btn = gr.Button("Submit")
129
  with gr.Column():
130
- output = gr.Video()
131
 
132
  submit_btn.click(
133
  fn = infer,
 
103
  noise_injection_steps=noise_injection_steps, # 0
104
  noise_injection_ratio= noise_injection_ratio, # 0.5
105
  ).frames[0]
106
+
107
+ print(f"FRAMES: {frames}")
108
 
109
  out_dir = "result"
110
 
111
  check_outputs_folder(out_dir)
112
  os.makedirs(out_dir, exist_ok=True)
113
  out_path = "result/video_result.gif"
114
+
115
+ '''
116
  if out_path.endswith('.gif'):
117
  frames[0].save(out_path, save_all=True, append_images=frames[1:], duration=142, loop=0)
118
  else:
119
  export_to_video(frames, out_path, fps=7)
120
+ '''
121
+ return "done"
122
 
123
  with gr.Blocks() as demo:
124
 
 
130
  image_input2 = gr.Image(type="filepath")
131
  submit_btn = gr.Button("Submit")
132
  with gr.Column():
133
+ output = gr.Textbox()
134
 
135
  submit_btn.click(
136
  fn = infer,