Spaces:
Sleeping
Sleeping
File size: 780 Bytes
dcb53fc f774200 e579fcc f774200 dcb53fc f774200 dcb53fc f774200 dcb53fc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from video_processing import process_video
def display_results(video_url, description):
final_clip_path = process_video(video_url, description)
if final_clip_path:
return final_clip_path, final_clip_path
return "No matching scene found", None
with gr.Blocks() as demo:
gr.Markdown("# My AI Video Processing App")
video_url = gr.Textbox(label="Video URL or Filepath")
description = gr.Textbox(label="Description of desired clip")
video_output = gr.Video(label="Processed Video")
download_output = gr.File(label="Download Processed Video")
submit_button = gr.Button("Process Video")
submit_button.click(fn=display_results, inputs=[video_url, description], outputs=[video_output, download_output])
demo.launch()
|