Luigi commited on
Commit
2529cb3
·
1 Parent(s): 636baf9

set default interval to 3s

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -115,7 +115,7 @@ def caption_frame(frame):
115
  st.title("🎥 Real-Time Camera Captioning with SmolVLM2 (CPU)")
116
 
117
  interval_ms = st.slider(
118
- "Caption every N ms", min_value=100, max_value=10000, value=1000, step=100
119
  )
120
 
121
  RTC_CONFIG = RTCConfiguration({
@@ -133,7 +133,6 @@ class CaptionProcessor(VideoProcessorBase):
133
  now = time.time()
134
  if now - self.last_time >= self.interval:
135
  self.last_time = now
136
- print("DEBUG ▶ CaptionProcessor.recv: time reached, generating caption")
137
  self.caption = caption_frame(img)
138
  return av.VideoFrame.from_ndarray(img, format="bgr24")
139
 
 
115
  st.title("🎥 Real-Time Camera Captioning with SmolVLM2 (CPU)")
116
 
117
  interval_ms = st.slider(
118
+ "Caption every N ms", min_value=100, max_value=10000, value=3000, step=100
119
  )
120
 
121
  RTC_CONFIG = RTCConfiguration({
 
133
  now = time.time()
134
  if now - self.last_time >= self.interval:
135
  self.last_time = now
 
136
  self.caption = caption_frame(img)
137
  return av.VideoFrame.from_ndarray(img, format="bgr24")
138