Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1077,14 +1077,15 @@ def save_file_to_hostinger(save_file_path):
|
|
1077 |
ftp_host = 'ftp.redmindtechnologies.com' # Replace with your FTP server address
|
1078 |
ftp_user = 'u852023448.redmindGpt' # Replace with your FTP username
|
1079 |
ftp_pass = 'RedMind@505' # Replace with your FTP password
|
1080 |
-
remote_file_path = '/
|
1081 |
|
1082 |
# Create an FTP connection
|
1083 |
ftp = FTP(ftp_host)
|
1084 |
ftp.login(ftp_user, ftp_pass)
|
1085 |
-
|
1086 |
# Open the local file and upload it to the server
|
1087 |
with open(save_file_path, 'rb') as file:
|
|
|
1088 |
ftp.storbinary(f'STOR {remote_file_path}', file)
|
1089 |
|
1090 |
print(f'File {save_file_path} uploaded to {remote_file_path} on server.')
|
@@ -1118,6 +1119,7 @@ def handle_large_dataset(df):
|
|
1118 |
|
1119 |
print(f"file path:{file_path}")
|
1120 |
df.to_excel(file_path, index=False)
|
|
|
1121 |
save_file_to_hostinger(file_path)
|
1122 |
# 4. Create a summary and table of the first 10 rows for display
|
1123 |
|
|
|
1077 |
ftp_host = 'ftp.redmindtechnologies.com' # Replace with your FTP server address
|
1078 |
ftp_user = 'u852023448.redmindGpt' # Replace with your FTP username
|
1079 |
ftp_pass = 'RedMind@505' # Replace with your FTP password
|
1080 |
+
remote_file_path = '/alborj/Output.xlsx' # Replace with the desired path on the server
|
1081 |
|
1082 |
# Create an FTP connection
|
1083 |
ftp = FTP(ftp_host)
|
1084 |
ftp.login(ftp_user, ftp_pass)
|
1085 |
+
print("hostinger connected")
|
1086 |
# Open the local file and upload it to the server
|
1087 |
with open(save_file_path, 'rb') as file:
|
1088 |
+
print(f"file opened in {save_file_path}")
|
1089 |
ftp.storbinary(f'STOR {remote_file_path}', file)
|
1090 |
|
1091 |
print(f'File {save_file_path} uploaded to {remote_file_path} on server.')
|
|
|
1119 |
|
1120 |
print(f"file path:{file_path}")
|
1121 |
df.to_excel(file_path, index=False)
|
1122 |
+
print(f"file saved in {file_path}")
|
1123 |
save_file_to_hostinger(file_path)
|
1124 |
# 4. Create a summary and table of the first 10 rows for display
|
1125 |
|