File size: 616 Bytes
3fcf71f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import gradio as gr
import subprocess
def download_loom_video(url):
output_path = "out/video.mp4"
result = subprocess.run(['python3', 'loom-dl.py', url, '-o', output_path], capture_output=True, text=True)
if result.returncode == 0:
return "Download successful!", output_path
else:
return f"Error: {result.stderr}", None
iface = gr.Interface(
fn=download_loom_video,
inputs="text",
outputs=["text", "file"],
title="Loom Video Downloader",
description="Enter the Loom video URL to download it as an MP4 file."
)
if __name__ == "__main__":
iface.launch()
|