fix
Browse files- app.py +5 -5
- requirements.txt +1 -1
app.py
CHANGED
@@ -142,7 +142,7 @@ with gr.Blocks(title="FrameVis - Video Frame Visualizer") as demo:
|
|
142 |
gr.Markdown("""
|
143 |
# 🎬 FrameVis - Video Frame Visualizer
|
144 |
Upload a video to create a beautiful visualization of its frames. The tool will extract frames at regular intervals
|
145 |
-
and combine them into a single image. **
|
146 |
""")
|
147 |
|
148 |
with gr.Row():
|
@@ -170,8 +170,8 @@ with gr.Blocks(title="FrameVis - Video Frame Visualizer") as demo:
|
|
170 |
with gr.Column(scale=2):
|
171 |
# Output components
|
172 |
frame_data = gr.State() # Hidden component to store frame data
|
173 |
-
output_image = gr.Image(label="Visualization Result",
|
174 |
-
frame_info = gr.Markdown("
|
175 |
preview_frame = gr.Image(label="Frame Preview", interactive=False, height=300)
|
176 |
|
177 |
# Handle processing
|
@@ -190,8 +190,8 @@ with gr.Blocks(title="FrameVis - Video Frame Visualizer") as demo:
|
|
190 |
outputs=[output_image, frame_data]
|
191 |
)
|
192 |
|
193 |
-
# Handle
|
194 |
-
output_image.
|
195 |
fn=on_mouse_move,
|
196 |
inputs=[frame_data],
|
197 |
outputs=[preview_frame, frame_info]
|
|
|
142 |
gr.Markdown("""
|
143 |
# 🎬 FrameVis - Video Frame Visualizer
|
144 |
Upload a video to create a beautiful visualization of its frames. The tool will extract frames at regular intervals
|
145 |
+
and combine them into a single image. **Click anywhere on the visualization to see the original frames!**
|
146 |
""")
|
147 |
|
148 |
with gr.Row():
|
|
|
170 |
with gr.Column(scale=2):
|
171 |
# Output components
|
172 |
frame_data = gr.State() # Hidden component to store frame data
|
173 |
+
output_image = gr.Image(label="Visualization Result", tool="select", height=300)
|
174 |
+
frame_info = gr.Markdown("Click on the visualization to see frame details")
|
175 |
preview_frame = gr.Image(label="Frame Preview", interactive=False, height=300)
|
176 |
|
177 |
# Handle processing
|
|
|
190 |
outputs=[output_image, frame_data]
|
191 |
)
|
192 |
|
193 |
+
# Handle selection events
|
194 |
+
output_image.select(
|
195 |
fn=on_mouse_move,
|
196 |
inputs=[frame_data],
|
197 |
outputs=[preview_frame, frame_info]
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
gradio>=4.
|
2 |
opencv-python-headless>=4.8.0
|
3 |
numpy>=1.24.0
|
4 |
fastapi>=0.115.0
|
|
|
1 |
+
gradio>=4.44.1
|
2 |
opencv-python-headless>=4.8.0
|
3 |
numpy>=1.24.0
|
4 |
fastapi>=0.115.0
|