3morrrrr commited on
Commit
d640b6b
·
verified ·
1 Parent(s): 3e0537a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -24,22 +24,23 @@ def upload_files(creators_file, overnight_file, day_file, prime_file):
24
  try:
25
  # Save each file using the 'data' attribute
26
  with open(os.path.join(UPLOAD_FOLDER, "creators_file.xlsx"), "wb") as f:
27
- f.write(creators_file.read())
28
 
29
  with open(os.path.join(UPLOAD_FOLDER, "overnight_file.xlsx"), "wb") as f:
30
- f.write(overnight_file.read())
31
 
32
  with open(os.path.join(UPLOAD_FOLDER, "day_file.xlsx"), "wb") as f:
33
- f.write(day_file.read())
34
 
35
  with open(os.path.join(UPLOAD_FOLDER, "prime_file.xlsx"), "wb") as f:
36
- f.write(prime_file.read())
37
 
38
  return "Files uploaded successfully!"
39
  except Exception as e:
40
  return f"Error uploading files: {e}"
41
 
42
 
 
43
  def generate_main_accounts():
44
  creators_file = os.path.join(UPLOAD_FOLDER, "creators_file.xlsx")
45
  chatter_files = [
 
24
  try:
25
  # Save each file using the 'data' attribute
26
  with open(os.path.join(UPLOAD_FOLDER, "creators_file.xlsx"), "wb") as f:
27
+ f.write(creators_file["data"])
28
 
29
  with open(os.path.join(UPLOAD_FOLDER, "overnight_file.xlsx"), "wb") as f:
30
+ f.write(overnight_file["data"])
31
 
32
  with open(os.path.join(UPLOAD_FOLDER, "day_file.xlsx"), "wb") as f:
33
+ f.write(day_file["data"])
34
 
35
  with open(os.path.join(UPLOAD_FOLDER, "prime_file.xlsx"), "wb") as f:
36
+ f.write(prime_file["data"])
37
 
38
  return "Files uploaded successfully!"
39
  except Exception as e:
40
  return f"Error uploading files: {e}"
41
 
42
 
43
+
44
  def generate_main_accounts():
45
  creators_file = os.path.join(UPLOAD_FOLDER, "creators_file.xlsx")
46
  chatter_files = [