Jeffgold commited on
Commit
9e0ee4e
·
1 Parent(s): 6fe1d4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -60,7 +60,11 @@ def download_file(url, destination):
60
 
61
  def get_input_path(video_file, video_url):
62
  if video_file is not None:
63
- return Path(video_file.name)
 
 
 
 
64
  elif video_url:
65
  url_path = urlparse(video_url).path
66
  file_name = Path(url_path).name
 
60
 
61
  def get_input_path(video_file, video_url):
62
  if video_file is not None:
63
+ # Save the uploaded file to the output directory
64
+ input_path = output_dir / video_file.name
65
+ with open(input_path, "wb") as f:
66
+ f.write(video_file.getbuffer())
67
+ return input_path
68
  elif video_url:
69
  url_path = urlparse(video_url).path
70
  file_name = Path(url_path).name