add timestamp to output file
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import subprocess
|
| 3 |
from moviepy.editor import VideoFileClip
|
|
|
|
| 4 |
|
| 5 |
def convert_to_mp4_with_aac(input_path, output_path):
|
| 6 |
# Load the video
|
|
@@ -26,8 +27,10 @@ def execute_command(command: str) -> None:
|
|
| 26 |
subprocess.run(command, check=True)
|
| 27 |
|
| 28 |
def infer(audio_input, image_path, emotional_style):
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
output_name = "
|
| 31 |
|
| 32 |
command = [
|
| 33 |
f"python",
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import subprocess
|
| 3 |
from moviepy.editor import VideoFileClip
|
| 4 |
+
import datetime
|
| 5 |
|
| 6 |
def convert_to_mp4_with_aac(input_path, output_path):
|
| 7 |
# Load the video
|
|
|
|
| 27 |
subprocess.run(command, check=True)
|
| 28 |
|
| 29 |
def infer(audio_input, image_path, emotional_style):
|
| 30 |
+
# Get the current timestamp
|
| 31 |
+
timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
| 32 |
|
| 33 |
+
output_name = f"lipsynced_result_{timestamp}"
|
| 34 |
|
| 35 |
command = [
|
| 36 |
f"python",
|