Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import numpy as np
|
|
4 |
from PIL import Image
|
5 |
import tempfile
|
6 |
import shutil
|
|
|
7 |
|
8 |
# Resize image while maintaining aspect ratio
|
9 |
def resize_image_with_aspect_ratio(img, target_size=(1280, 720), padding_color=(0, 0, 0)):
|
@@ -86,7 +87,7 @@ def gradio_interface():
|
|
86 |
with gr.Row():
|
87 |
with gr.Column():
|
88 |
mp3_input = gr.Audio(type="filepath", label="Upload MP3") # MP3 input
|
89 |
-
image_input = gr.File(type="
|
90 |
generate_button = gr.Button("Generate Video") # Button to generate video
|
91 |
|
92 |
output_video = gr.Video(label="Generated Video") # Video output display
|
|
|
4 |
from PIL import Image
|
5 |
import tempfile
|
6 |
import shutil
|
7 |
+
import os
|
8 |
|
9 |
# Resize image while maintaining aspect ratio
|
10 |
def resize_image_with_aspect_ratio(img, target_size=(1280, 720), padding_color=(0, 0, 0)):
|
|
|
87 |
with gr.Row():
|
88 |
with gr.Column():
|
89 |
mp3_input = gr.Audio(type="filepath", label="Upload MP3") # MP3 input
|
90 |
+
image_input = gr.File(type="filepath", file_types=[".jpg", ".png"], label="Upload Images", file_count="multiple") # Images input
|
91 |
generate_button = gr.Button("Generate Video") # Button to generate video
|
92 |
|
93 |
output_video = gr.Video(label="Generated Video") # Video output display
|