fffiloni commited on
Commit
c5f474f
1 Parent(s): b7a6e89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -10
app.py CHANGED
@@ -177,17 +177,34 @@ 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
- with gr.Blocks() as demo:
 
 
 
 
 
181
  with gr.Column(elem_id="col-container"):
182
- gr.Markdown("# Video-To-Audio")
183
- with gr.Row():
184
- with gr.Column():
185
- video_in = gr.Video(label='Video IN')
186
- submit_btn = gr.Button("Submit")
187
- with gr.Column():
188
- output_sound = gr.Audio(label="Audio OUT")
189
- output_spectrogram = gr.Image(label='Spectrogram')
190
- merged_out = gr.Video(label="Merged video + generated audio")
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
  submit_btn.click(
193
  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
+ css = """
181
+ #col-container{
182
+ max-width: 800px;
183
+ }
184
+ """
185
+ with gr.Blocks(css=css) as demo:
186
  with gr.Column(elem_id="col-container"):
187
+ gr.Markdown("# Video-to-Audio Generation with Hidden Alignment")
188
+ gr.HTML("""
189
+ <div style="display:flex;column-gap:4px;">
190
+ <a href='https://sites.google.com/view/vta-ldm'>
191
+ <img src='https://img.shields.io/badge/Project-Page-Green'>
192
+ </a>
193
+ <a href='https://huggingface.co/papers/2407.07464'>
194
+ <img src='https://img.shields.io/badge/HF-Paper-red'>
195
+ </a>
196
+ <a href='https://github.com/ariesssxu/vta-ldm'>
197
+ <img src='https://img.shields.io/badge/GitHub-Code-Blue'>
198
+ </a>
199
+ </div>
200
+ """)
201
+ with gr.Column():
202
+ video_in = gr.Video(label='Video IN')
203
+ submit_btn = gr.Button("Submit")
204
+
205
+ output_sound = gr.Audio(label="Audio OUT")
206
+ output_spectrogram = gr.Image(label='Spectrogram')
207
+ merged_out = gr.Video(label="Merged video + generated audio")
208
 
209
  submit_btn.click(
210
  fn = infer,