Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,15 +7,41 @@ def display_results(video_url, description):
|
|
| 7 |
return final_clip_path, final_clip_path
|
| 8 |
return "No matching scene found", None
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
submit_button.click(fn=display_results, inputs=[video_url, description], outputs=[video_output, download_output])
|
| 20 |
|
| 21 |
demo.launch()
|
|
|
|
| 7 |
return final_clip_path, final_clip_path
|
| 8 |
return "No matching scene found", None
|
| 9 |
|
| 10 |
+
# Custom CSS
|
| 11 |
+
css = """
|
| 12 |
+
body {
|
| 13 |
+
background-color: #2c3e50;
|
| 14 |
+
color: #ecf0f1;
|
| 15 |
+
font-family: 'Arial', sans-serif;
|
| 16 |
+
}
|
| 17 |
+
h1, h2, h3, h4, h5, h6 {
|
| 18 |
+
color: #ecf0f1;
|
| 19 |
+
}
|
| 20 |
+
#video_url, #description {
|
| 21 |
+
background-color: #34495e;
|
| 22 |
+
color: #ecf0f1;
|
| 23 |
+
border: 1px solid #ecf0f1;
|
| 24 |
+
}
|
| 25 |
+
#submit_button {
|
| 26 |
+
background-color: #e74c3c;
|
| 27 |
+
color: #ecf0f1;
|
| 28 |
+
border: 1px solid #ecf0f1;
|
| 29 |
+
}
|
| 30 |
+
#submit_button:hover {
|
| 31 |
+
background-color: #c0392b;
|
| 32 |
+
}
|
| 33 |
+
#video_output, #download_output {
|
| 34 |
+
border: 1px solid #ecf0f1;
|
| 35 |
+
}
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
with gr.Blocks(css=css) as demo:
|
| 39 |
+
gr.Markdown("# My AI Video Processing App")
|
| 40 |
+
video_url = gr.Textbox(label="Video URL or Filepath", elem_id="video_url")
|
| 41 |
+
description = gr.Textbox(label="Description of desired clip", elem_id="description")
|
| 42 |
+
video_output = gr.Video(label="Processed Video", elem_id="video_output")
|
| 43 |
+
download_output = gr.File(label="Download Processed Video", elem_id="download_output")
|
| 44 |
+
submit_button = gr.Button("Process Video", elem_id="submit_button")
|
| 45 |
submit_button.click(fn=display_results, inputs=[video_url, description], outputs=[video_output, download_output])
|
| 46 |
|
| 47 |
demo.launch()
|