File size: 1,403 Bytes
dcb53fc
 
 
f774200
 
e579fcc
 
 
f774200
5bc9969
 
 
4b4dd62
5bc9969
 
 
 
4b4dd62
5bc9969
 
4b4dd62
5bc9969
 
 
 
4b4dd62
5bc9969
 
 
 
 
 
 
4b4dd62
5bc9969
 
 
 
4b4dd62
5bc9969
 
 
 
 
f774200
dcb53fc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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

# Custom CSS
css = """
body {
    background-color: #eb5726;
    color: #ecf0f1;
    font-family: 'Arial', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    color: #0b0d1a;
}
#video_url, #description {
    background-color: #eb5726;
    color: #ecf0f1;
    border: 1px solid #ecf0f1;
}
#submit_button {
    background-color: #eb5726;
    color: #ecf0f1;
    border: 1px solid #ecf0f1;
}
#submit_button:hover {
    background-color: #c0392b;
}
#video_output, #download_output {
    border: 1px solid #eb5726;
}
"""

with gr.Blocks(css=css) as demo:
    gr.Markdown("# Sickstadium AI")
    video_url = gr.Textbox(label="Video URL or Filepath", elem_id="video_url")
    description = gr.Textbox(label="Description of desired clip", elem_id="description")
    video_output = gr.Video(label="Processed Video", elem_id="video_output")
    download_output = gr.File(label="Download Processed Video", elem_id="download_output")
    submit_button = gr.Button("Process Video", elem_id="submit_button")
    submit_button.click(fn=display_results, inputs=[video_url, description], outputs=[video_output, download_output])

demo.launch()