Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ from main import load_moondream, process_video
|
|
5 |
import tempfile
|
6 |
import shutil
|
7 |
import torch
|
|
|
8 |
import spaces
|
9 |
|
10 |
# Get absolute path to workspace root
|
@@ -110,12 +111,24 @@ with gr.Blocks(title="Promptable Video Redaction") as app:
|
|
110 |
with gr.Column():
|
111 |
# Input components
|
112 |
video_input = gr.Video(label="Upload Video")
|
|
|
113 |
detect_input = gr.Textbox(
|
114 |
label="What to Detect",
|
115 |
placeholder="e.g. face, logo, text, person, car, dog, etc.",
|
116 |
value="face",
|
117 |
info="Moondream can detect anything that you can describe in natural language",
|
118 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
process_btn = gr.Button("Process Video", variant="primary")
|
120 |
|
121 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
5 |
import tempfile
|
6 |
import shutil
|
7 |
import torch
|
8 |
+
|
9 |
import spaces
|
10 |
|
11 |
# Get absolute path to workspace root
|
|
|
111 |
with gr.Column():
|
112 |
# Input components
|
113 |
video_input = gr.Video(label="Upload Video")
|
114 |
+
|
115 |
detect_input = gr.Textbox(
|
116 |
label="What to Detect",
|
117 |
placeholder="e.g. face, logo, text, person, car, dog, etc.",
|
118 |
value="face",
|
119 |
info="Moondream can detect anything that you can describe in natural language",
|
120 |
)
|
121 |
+
|
122 |
+
gr.Examples(
|
123 |
+
examples=[
|
124 |
+
["examples/homealone.mp4", "face"],
|
125 |
+
["examples/soccer.mp4", "ball"],
|
126 |
+
["examples/rally.mp4", "license plate"],
|
127 |
+
],
|
128 |
+
inputs=[video_input, detect_input],
|
129 |
+
label="Try these examples",
|
130 |
+
)
|
131 |
+
|
132 |
process_btn = gr.Button("Process Video", variant="primary")
|
133 |
|
134 |
with gr.Accordion("Advanced Settings", open=False):
|