Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
28 |
|
29 |
with open(os.path.join(UPLOAD_FOLDER, "overnight_file.xlsx"), "wb") as f:
|
30 |
-
f.write(overnight_file
|
31 |
|
32 |
with open(os.path.join(UPLOAD_FOLDER, "day_file.xlsx"), "wb") as f:
|
33 |
-
f.write(day_file
|
34 |
|
35 |
with open(os.path.join(UPLOAD_FOLDER, "prime_file.xlsx"), "wb") as f:
|
36 |
-
f.write(prime_file
|
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 = [
|