Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -134,19 +134,20 @@ def infer(video_in):
|
|
| 134 |
wave_files = get_wav_files('./outputs/tmp')
|
| 135 |
print(wave_files)
|
| 136 |
plot_spectrogram(wave_files[0], 'spectrogram.png')
|
| 137 |
-
|
| 138 |
-
return wave_files[0], 'spectrogram.png'
|
| 139 |
|
| 140 |
with gr.Blocks() as demo:
|
| 141 |
with gr.Column(elem_id="col-container"):
|
| 142 |
gr.Markdown("# Video-To-Audio")
|
| 143 |
with gr.Row():
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
| 150 |
|
| 151 |
submit_btn.click(
|
| 152 |
fn = infer,
|
|
|
|
| 134 |
wave_files = get_wav_files('./outputs/tmp')
|
| 135 |
print(wave_files)
|
| 136 |
plot_spectrogram(wave_files[0], 'spectrogram.png')
|
| 137 |
+
final_merged_out = merge_audio_to_video(video_in, wave_files[0])
|
| 138 |
+
return wave_files[0], 'spectrogram.png', final_merged_out
|
| 139 |
|
| 140 |
with gr.Blocks() as demo:
|
| 141 |
with gr.Column(elem_id="col-container"):
|
| 142 |
gr.Markdown("# Video-To-Audio")
|
| 143 |
with gr.Row():
|
| 144 |
+
with gr.Column():
|
| 145 |
+
video_in = gr.Video(label='Video IN')
|
| 146 |
+
submit_btn = gr.Button("Submit")
|
| 147 |
+
with gr.Column():
|
| 148 |
+
output_sound = gr.Audio(label="Audio OUT")
|
| 149 |
+
output_spectrogram = gr.Image(label='Spectrogram')
|
| 150 |
+
merged_out = gr.Video(label="Merged video + generated audio")
|
| 151 |
|
| 152 |
submit_btn.click(
|
| 153 |
fn = infer,
|