loom-dl / loom-dl.py
iiced's picture
Set up FastAPI for loom-dl
3fcf71f
raw
history blame
616 Bytes
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()