Update app.py
Browse files
app.py
CHANGED
@@ -366,6 +366,26 @@ def create_interface():
|
|
366 |
variant="primary",
|
367 |
size="lg"
|
368 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
|
370 |
with gr.Column():
|
371 |
output_video = gr.Video(
|
|
|
366 |
variant="primary",
|
367 |
size="lg"
|
368 |
)
|
369 |
+
sample_videos = []
|
370 |
+
sample_files = ["sample_drone_1.mp4", "sample_drone_2.mp4", "sample_drone_3.mp4"]
|
371 |
+
|
372 |
+
for sample_file in sample_files:
|
373 |
+
if os.path.exists(sample_file):
|
374 |
+
sample_videos.append(sample_file)
|
375 |
+
|
376 |
+
if sample_videos:
|
377 |
+
gr.Markdown("**📂 Or try these sample videos:**")
|
378 |
+
|
379 |
+
def load_sample_video(video_path):
|
380 |
+
return video_path
|
381 |
+
|
382 |
+
with gr.Row():
|
383 |
+
for i, sample_video in enumerate(sample_videos, 1):
|
384 |
+
sample_btn = gr.Button(f"📹 Sample {i}", size="sm")
|
385 |
+
sample_btn.click(
|
386 |
+
fn=lambda x=sample_video: x,
|
387 |
+
outputs=input_video
|
388 |
+
)
|
389 |
|
390 |
with gr.Column():
|
391 |
output_video = gr.Video(
|