Spaces:
Sleeping
Sleeping
Update chatgpt-ad-maker.py
Browse files- chatgpt-ad-maker.py +2 -2
chatgpt-ad-maker.py
CHANGED
|
@@ -147,9 +147,9 @@ with gr.Blocks(title="Dot Effect Generator") as iface:
|
|
| 147 |
# Update FPS slider max value based on input video
|
| 148 |
def update_fps_slider(video_path):
|
| 149 |
if video_path is None:
|
| 150 |
-
return gr.
|
| 151 |
fps = get_video_fps(video_path)
|
| 152 |
-
return gr.
|
| 153 |
|
| 154 |
vid_input.change(update_fps_slider, vid_input, vid_fps)
|
| 155 |
|
|
|
|
| 147 |
# Update FPS slider max value based on input video
|
| 148 |
def update_fps_slider(video_path):
|
| 149 |
if video_path is None:
|
| 150 |
+
return gr.update(maximum=60, value=30) # Default if no video
|
| 151 |
fps = get_video_fps(video_path)
|
| 152 |
+
return gr.update(maximum=fps, value=min(fps, 30))
|
| 153 |
|
| 154 |
vid_input.change(update_fps_slider, vid_input, vid_fps)
|
| 155 |
|