sc45's picture
app.py
824a82b
raw
history blame contribute delete
854 Bytes
import gradio as gr
from main import main as process_video
def run_pipeline(youtube_url):
# Run the main processing function from your script
# This function should save the final video in the '/translated/' directory
process_video(youtube_url)
# Construct the path to the final video
# Assuming the video is named 'final_video.mp4' and stored in '/translated/'
final_video_path = './translated/final_video.mp4'
# Return the path for Gradio to display
return final_video_path
iface = gr.Interface(
fn=run_pipeline,
inputs=gr.Textbox(lines=2, placeholder="Enter YouTube Video URL here..."),
outputs=gr.Video(),
title="YouTube Video Processing",
description="Enter a YouTube URL to process the video through transcription, translation, and more."
)
if __name__ == "__main__":
iface.launch()