Spaces:
Runtime error
Runtime error
new prompt
Browse files
app.py
CHANGED
@@ -100,27 +100,26 @@ def get_completion(prompt, files_info, top_p, temperature):
|
|
100 |
"role": "system",
|
101 |
# "content": f"""Act as a FFMPEG expert. Create a valid FFMPEG command that will be directly pasted in the terminal. Using those files: {files_info} create the FFMPEG command to achieve this: "{prompt}". Make sure it's a valid command that will not do any error. Always name the output of the FFMPEG command "output.mp4". Always use the FFMPEG overwrite option (-y). Don't produce video longer than 1 minute. Think step by step but never give any explanation, only the shell command.""",
|
102 |
# "content": f"""You'll need to create a valid FFMPEG command that will be directly pasted in the terminal. You have those files (images, videos, and audio) at your disposal: {files_info} and you need to compose a new video using FFMPEG and following those instructions: "{prompt}". You'll need to use as many assets as you can. Make sure it's a valid command that will not do any error. Always name the output of the FFMPEG command "output.mp4". Always use the FFMPEG overwrite option (-y). Try to avoid using -filter_complex option. Don't produce video longer than 1 minute. Think step by step but never give any explanation, only the shell command.""",
|
103 |
-
"content": """
|
104 |
-
|
|
|
105 |
(1) a set of video, audio and/or image assets. Including their name, duration, dimensions and file size
|
106 |
(2) the description of a new video you need to create from the list of assets
|
107 |
|
108 |
Based on the available assets and the description, your objective issue a FFMPEG to create a new video using the assets.
|
109 |
-
|
110 |
This will often involve putting assets one after the other, cropping the video format, or playing music in the background. Avoid using complex FFMPEG options, and try to keep the command as simple as possible as it will be directly paster into the terminal.
|
111 |
-
Always output the media a video/mp4 and output file "output.mp4". Provide only the shell command without any explanations.
|
112 |
""",
|
113 |
},
|
114 |
{
|
115 |
"role": "user",
|
116 |
-
"content": f"""
|
117 |
The current assets and objective follow. Reply with the FFMPEG command:
|
118 |
|
119 |
AVAILABLE ASSETS LIST:
|
120 |
|
121 |
{files_info_string}
|
122 |
|
123 |
-
OBJECTIVE: {prompt}
|
124 |
YOUR FFMPEG COMMAND:
|
125 |
""",
|
126 |
},
|
@@ -280,7 +279,7 @@ with gr.Blocks(css=css) as demo:
|
|
280 |
],
|
281 |
[
|
282 |
["./examples/heat-wave.mp3", "./examples/square-image.png"],
|
283 |
-
"Make a 720x720 video
|
284 |
0,
|
285 |
0,
|
286 |
],
|
|
|
100 |
"role": "system",
|
101 |
# "content": f"""Act as a FFMPEG expert. Create a valid FFMPEG command that will be directly pasted in the terminal. Using those files: {files_info} create the FFMPEG command to achieve this: "{prompt}". Make sure it's a valid command that will not do any error. Always name the output of the FFMPEG command "output.mp4". Always use the FFMPEG overwrite option (-y). Don't produce video longer than 1 minute. Think step by step but never give any explanation, only the shell command.""",
|
102 |
# "content": f"""You'll need to create a valid FFMPEG command that will be directly pasted in the terminal. You have those files (images, videos, and audio) at your disposal: {files_info} and you need to compose a new video using FFMPEG and following those instructions: "{prompt}". You'll need to use as many assets as you can. Make sure it's a valid command that will not do any error. Always name the output of the FFMPEG command "output.mp4". Always use the FFMPEG overwrite option (-y). Try to avoid using -filter_complex option. Don't produce video longer than 1 minute. Think step by step but never give any explanation, only the shell command.""",
|
103 |
+
"content": """You are a very experienced media engineer,controlling a UNIX terminal. You are an FFMPEG expert with years of experience and multiple contributions to the FFMPEG project.
|
104 |
+
|
105 |
+
You are given:
|
106 |
(1) a set of video, audio and/or image assets. Including their name, duration, dimensions and file size
|
107 |
(2) the description of a new video you need to create from the list of assets
|
108 |
|
109 |
Based on the available assets and the description, your objective issue a FFMPEG to create a new video using the assets.
|
|
|
110 |
This will often involve putting assets one after the other, cropping the video format, or playing music in the background. Avoid using complex FFMPEG options, and try to keep the command as simple as possible as it will be directly paster into the terminal.
|
|
|
111 |
""",
|
112 |
},
|
113 |
{
|
114 |
"role": "user",
|
115 |
+
"content": f"""Always output the media as video/mp4 and output file with "output.mp4". Provide only the shell command without any explanations.
|
116 |
The current assets and objective follow. Reply with the FFMPEG command:
|
117 |
|
118 |
AVAILABLE ASSETS LIST:
|
119 |
|
120 |
{files_info_string}
|
121 |
|
122 |
+
OBJECTIVE: {prompt} and output at "output.mp4"
|
123 |
YOUR FFMPEG COMMAND:
|
124 |
""",
|
125 |
},
|
|
|
279 |
],
|
280 |
[
|
281 |
["./examples/heat-wave.mp3", "./examples/square-image.png"],
|
282 |
+
"Make a 720x720 video, a white waveform of the audio taking all screen space, and finally add add the input image as the background all along the video.",
|
283 |
0,
|
284 |
0,
|
285 |
],
|