azamat commited on
Commit
e20ef5a
·
1 Parent(s): c8a05d1
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,10 +19,10 @@ def remove_downloaded_videos():
19
  os.remove(file_path)
20
 
21
  def search(query):
22
- remove_downloaded_videos() # Remove previously downloaded videos
23
  shorts = weaviate_explorer.explore(query)
24
  download_url = f"https://drive.google.com/uc?id={shorts[0]['link'].split('/')[-2]}"
25
- video_path = gdown.download(download_url, output=f"{downloads_dir}/video.mp4")
26
  video_player.value = video_path
27
  print(video_path)
28
  return video_player, "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])
 
19
  os.remove(file_path)
20
 
21
  def search(query):
22
+ # remove_downloaded_videos() # Remove previously downloaded videos
23
  shorts = weaviate_explorer.explore(query)
24
  download_url = f"https://drive.google.com/uc?id={shorts[0]['link'].split('/')[-2]}"
25
+ video_path = gdown.download(download_url, output=f"./video.mp4")
26
  video_player.value = video_path
27
  print(video_path)
28
  return video_player, "\n\n".join([f"{r['title']}\n{r['link']}" for r in shorts])