Update app.py
Browse files
app.py
CHANGED
|
@@ -54,16 +54,6 @@ def process_video(audio_path, video_path):
|
|
| 54 |
print("Video generation successful!")
|
| 55 |
return "output.mp4"
|
| 56 |
|
| 57 |
-
# Step 5: Create a test function for video writing
|
| 58 |
-
def create_test_video():
|
| 59 |
-
print("Creating test video...")
|
| 60 |
-
out = cv2.VideoWriter('test_output.mp4', cv2.VideoWriter_fourcc(*'mp4v'), 30, (128, 128))
|
| 61 |
-
frame = 255 * np.ones((128, 128, 3), dtype=np.uint8)
|
| 62 |
-
for _ in range(60): # 2 seconds of video
|
| 63 |
-
out.write(frame)
|
| 64 |
-
out.release()
|
| 65 |
-
print("Test video created.")
|
| 66 |
-
|
| 67 |
# Gradio Interface
|
| 68 |
with gr.Blocks() as demo:
|
| 69 |
gr.Markdown("### Upload an Audio and Video file to generate an output video.")
|
|
|
|
| 54 |
print("Video generation successful!")
|
| 55 |
return "output.mp4"
|
| 56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
# Gradio Interface
|
| 58 |
with gr.Blocks() as demo:
|
| 59 |
gr.Markdown("### Upload an Audio and Video file to generate an output video.")
|