KingNish commited on
Commit
20a8bd2
1 Parent(s): eb2581c

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +3 -1
chatbot.py CHANGED
@@ -42,6 +42,8 @@ def sample_frames(video_file, num_frames) :
42
  # extracts 5 images/sec of video
43
  if (total_frames/fps) < 3:
44
  num_frames = 12
 
 
45
  else:
46
  num_frames = ((total_frames//fps)*5)
47
  interval = total_frames // num_frames
@@ -75,7 +77,7 @@ EXAMPLES = [
75
  ],
76
  [
77
  {
78
- "text": "Explain the cause of Accident",
79
  "files": [f"{examples_path}/example_video/accident.mp4"],
80
  }
81
  ],
 
42
  # extracts 5 images/sec of video
43
  if (total_frames/fps) < 3:
44
  num_frames = 12
45
+ elif (total_frames/fps) > 5:
46
+ num_frames = 24
47
  else:
48
  num_frames = ((total_frames//fps)*5)
49
  interval = total_frames // num_frames
 
77
  ],
78
  [
79
  {
80
+ "text": "What unusual happens in this video.",
81
  "files": [f"{examples_path}/example_video/accident.mp4"],
82
  }
83
  ],