Spaces:
Running
on
Zero
Running
on
Zero
feat: Enable MCP (#4)
Browse files- feat: Enable MCP (3b9399cb5a39200430a8a9e0d3aa5139ead2eb42)
Co-authored-by: Apolinário from multimodal AI art <[email protected]>
app.py
CHANGED
@@ -230,6 +230,19 @@ def get_video_duration(video_path):
|
|
230 |
@torch.inference_mode()
|
231 |
@torch.no_grad()
|
232 |
def synthesize_video_with_audio(video_file, caption, cot):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
yield "⏳ Extracting Features…", None
|
234 |
video_path = video_file
|
235 |
if caption is None:
|
@@ -335,9 +348,6 @@ demo = gr.Interface(
|
|
335 |
)
|
336 |
|
337 |
if __name__ == "__main__":
|
338 |
-
demo.queue().launch(share=True)
|
339 |
-
|
340 |
-
demo.launch(share=True)
|
341 |
-
|
342 |
-
|
343 |
|
|
|
|
230 |
@torch.inference_mode()
|
231 |
@torch.no_grad()
|
232 |
def synthesize_video_with_audio(video_file, caption, cot):
|
233 |
+
"""
|
234 |
+
Synthesizes audio for a given video using text captions and chain-of-thought descriptions.
|
235 |
+
|
236 |
+
Args:
|
237 |
+
video_file: Path to the input video file
|
238 |
+
caption: Optional text caption describing the desired audio
|
239 |
+
cot: Optional chain-of-thought description for enhanced audio generation
|
240 |
+
|
241 |
+
Returns:
|
242 |
+
Generator yielding tuples of (status_message, output_video_path) where output_video_path
|
243 |
+
is None during processing and contains the path to the final video with synthesized audio
|
244 |
+
when complete
|
245 |
+
"""
|
246 |
yield "⏳ Extracting Features…", None
|
247 |
video_path = video_file
|
248 |
if caption is None:
|
|
|
348 |
)
|
349 |
|
350 |
if __name__ == "__main__":
|
351 |
+
demo.queue().launch(share=True, mcp_server=True)
|
|
|
|
|
|
|
|
|
352 |
|
353 |
+
demo.launch(share=True, mcp_server=True)
|