Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1170,7 +1170,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
|
|
1170 |
#docstatus = f"Download the complete dataset <a href='https://huggingface.co/spaces/Redmind/NewageNXTGPT/resolve/main/assets/output.xlsx' download> here.</a>.There are total of {total_rows} rows."
|
1171 |
|
1172 |
if total_rows < 4000:
|
1173 |
-
|
1174 |
|
1175 |
# 1. Drop the original first column
|
1176 |
if len(df.columns) > 1:
|
@@ -1210,7 +1210,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
|
|
1210 |
directory = user_name + "/" + formatted_date_time
|
1211 |
create_file_HF(file_path, directory,False)
|
1212 |
dataset_link = get_download_link(directory,file_path)
|
1213 |
-
docstatus =
|
1214 |
print("File created in the home path")
|
1215 |
|
1216 |
#save_file_to_hostinger('output_data.xlsx')
|
@@ -1234,7 +1234,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
|
|
1234 |
create_file_HF(zip_file_name,directory, False)
|
1235 |
link = get_download_link(directory,zip_file_name)
|
1236 |
print(f"downloadable link: {link}")
|
1237 |
-
docstatus = f"""Please download the complete dataset here: <a href="{link}" download>
|
1238 |
print(sample_table)
|
1239 |
# 5. Return the summary and downloadable link
|
1240 |
#return f"""
|
|
|
1170 |
#docstatus = f"Download the complete dataset <a href='https://huggingface.co/spaces/Redmind/NewageNXTGPT/resolve/main/assets/output.xlsx' download> here.</a>.There are total of {total_rows} rows."
|
1171 |
|
1172 |
if total_rows < 4000:
|
1173 |
+
|
1174 |
|
1175 |
# 1. Drop the original first column
|
1176 |
if len(df.columns) > 1:
|
|
|
1210 |
directory = user_name + "/" + formatted_date_time
|
1211 |
create_file_HF(file_path, directory,False)
|
1212 |
dataset_link = get_download_link(directory,file_path)
|
1213 |
+
docstatus = f"""These are the sample data. Download the complete dataset <a href="{dataset_link}" download> here.</a>."""
|
1214 |
print("File created in the home path")
|
1215 |
|
1216 |
#save_file_to_hostinger('output_data.xlsx')
|
|
|
1234 |
create_file_HF(zip_file_name,directory, False)
|
1235 |
link = get_download_link(directory,zip_file_name)
|
1236 |
print(f"downloadable link: {link}")
|
1237 |
+
docstatus = f"""Please download the complete dataset here: <a href="{dataset_link}" download> here.</a>. Please click to download generated <a href="{link}" download>PDFs</a>. {total_rows} documents are created successfully."""
|
1238 |
print(sample_table)
|
1239 |
# 5. Return the summary and downloadable link
|
1240 |
#return f"""
|