marianna13 commited on
Commit
3406caf
β€’
1 Parent(s): 7c2a32a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -55,7 +55,7 @@ class SearchVideo:
55
  def extract_seg(self, video:str, start:int):
56
  start = start if start > 5 else start-5
57
  start = time.strftime('%H:%M:%S', time.gmtime(start))
58
- cmd = f'ffmpeg -ss {start} -i "{video}" -t 00:00:05 -vcodec copy -acodec copy -y segment_{start}.mp4'
59
  os.system(cmd)
60
  return f'segment_{start}.mp4'
61
 
@@ -148,7 +148,7 @@ def search_video(video_url, text, video=None):
148
  return f'"{text}" found at {start}', seg_path
149
 
150
  title = 'πŸ”ŽπŸŽžοΈπŸš€ Search inside a video'
151
- description = '''Just enter a search query, a video URL or upload your video and get a 5-sec fragment from the video which is visually closest to you query.'''
152
 
153
  examples = [["https://www.youtube.com/watch?v=M93w3TjzVUE", "A dog"]]
154
 
 
55
  def extract_seg(self, video:str, start:int):
56
  start = start if start > 5 else start-5
57
  start = time.strftime('%H:%M:%S', time.gmtime(start))
58
+ cmd = f'ffmpeg -ss {start} -i "{video}" -t 00:00:02 -vcodec copy -acodec copy -y segment_{start}.mp4'
59
  os.system(cmd)
60
  return f'segment_{start}.mp4'
61
 
 
148
  return f'"{text}" found at {start}', seg_path
149
 
150
  title = 'πŸ”ŽπŸŽžοΈπŸš€ Search inside a video'
151
+ description = '''Just enter a search query, a video URL or upload your video and get a 2-sec fragment from the video which is visually closest to you query.'''
152
 
153
  examples = [["https://www.youtube.com/watch?v=M93w3TjzVUE", "A dog"]]
154