jschwab21 commited on
Commit
5e72242
·
verified ·
1 Parent(s): 74286d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -54,9 +54,10 @@ def save_uploaded_file(file):
54
  os.makedirs(upload_dir, exist_ok=True)
55
  file_path = os.path.join(upload_dir, file.name)
56
  with open(file_path, "wb") as f:
57
- f.write(file.encode('utf-8')) # Convert to bytes and write
58
  return file_path
59
 
 
60
  def display_results(video_url, video_file, description):
61
  if video_url:
62
  final_clip_path = process_video(video_url, description, is_url=True)
 
54
  os.makedirs(upload_dir, exist_ok=True)
55
  file_path = os.path.join(upload_dir, file.name)
56
  with open(file_path, "wb") as f:
57
+ shutil.copyfileobj(file, f)
58
  return file_path
59
 
60
+
61
  def display_results(video_url, video_file, description):
62
  if video_url:
63
  final_clip_path = process_video(video_url, description, is_url=True)