jschwab21 commited on
Commit
d376d93
·
verified ·
1 Parent(s): ccaa938

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -54,7 +54,8 @@ 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.getvalue()) # Write the content directly
 
58
  return file_path
59
 
60
  def display_results(video_url, video_file, description):
 
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
+ # Use .read() to read the file content from the TemporaryUploadedFile
58
+ f.write(file.file.read())
59
  return file_path
60
 
61
  def display_results(video_url, video_file, description):