Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -177,13 +177,8 @@ def infer(video_in):
|
|
177 |
final_merged_out = merge_audio_to_video(video_in, wave_files[0])
|
178 |
return wave_files[0], 'spectrogram.png', final_merged_out
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
max-width: 800px;
|
183 |
-
margin: 0 auto;
|
184 |
-
}
|
185 |
-
"""
|
186 |
-
with gr.Blocks(css=css) as demo:
|
187 |
with gr.Column(elem_id="col-container"):
|
188 |
gr.Markdown("# Video-to-Audio Generation with Hidden Alignment")
|
189 |
gr.HTML("""
|
@@ -196,13 +191,23 @@ with gr.Blocks(css=css) as demo:
|
|
196 |
</a>
|
197 |
</div>
|
198 |
""")
|
199 |
-
with gr.
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
submit_btn.click(
|
208 |
fn = infer,
|
|
|
177 |
final_merged_out = merge_audio_to_video(video_in, wave_files[0])
|
178 |
return wave_files[0], 'spectrogram.png', final_merged_out
|
179 |
|
180 |
+
|
181 |
+
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
182 |
with gr.Column(elem_id="col-container"):
|
183 |
gr.Markdown("# Video-to-Audio Generation with Hidden Alignment")
|
184 |
gr.HTML("""
|
|
|
191 |
</a>
|
192 |
</div>
|
193 |
""")
|
194 |
+
with gr.Row():
|
195 |
+
with gr.Column():
|
196 |
+
video_in = gr.Video(label='Video IN')
|
197 |
+
submit_btn = gr.Button("Submit")
|
198 |
+
gr.Examples(
|
199 |
+
examples = [
|
200 |
+
["./examples/lion_gt.mp4"],
|
201 |
+
["./examples/ice_gt.mp4"],
|
202 |
+
["./examples/seashore.mp4"],
|
203 |
+
["./examples/typewriter_gt.mp4"],
|
204 |
+
],
|
205 |
+
inputs = [video_in]
|
206 |
+
)
|
207 |
+
with gr.Column():
|
208 |
+
output_sound = gr.Audio(label="Audio OUT")
|
209 |
+
output_spectrogram = gr.Image(label='Spectrogram')
|
210 |
+
merged_out = gr.Video(label="Merged video + generated audio")
|
211 |
|
212 |
submit_btn.click(
|
213 |
fn = infer,
|