SantanuBanerjee commited on
Commit
946a972
·
verified ·
1 Parent(s): 13a4179

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -355,13 +355,13 @@ def process_excel(file):
355
  output_file = "Output_Proposals.xlsx"
356
  result_df.to_excel(output_file, index=False)
357
 
358
- return output_file # Return the processed DataFrame as Excel file
359
 
360
  except Exception as e:
361
  # return str(e) # Return the error message
362
  error_message = f"Error processing file: {str(e)}"
363
  print(error_message) # Log the error
364
- return error_message # Return the error message to the user
365
 
366
 
367
 
@@ -390,8 +390,12 @@ interface = gr.Interface(
390
  examples=example_files, # Add the example files
391
 
392
  # outputs=gr.File(label="Download Processed Excel File"), # File download output
393
- outputs=gr.File(label="Download the processed Excel File containing the ** Project Proposals ** for each Location~Problem paired combination"), # File download output
394
 
 
 
 
 
395
 
396
  # title="Excel File Uploader",
397
  # title="Upload Excel file containing #TaxDirections → Download HyperLocal Project Proposals\n",
 
355
  output_file = "Output_Proposals.xlsx"
356
  result_df.to_excel(output_file, index=False)
357
 
358
+ return output_file, "Santanu Banerjee" # Return the processed DataFrame as Excel file
359
 
360
  except Exception as e:
361
  # return str(e) # Return the error message
362
  error_message = f"Error processing file: {str(e)}"
363
  print(error_message) # Log the error
364
+ return error_message, "Santanu Banerjee" # Return the error message to the user
365
 
366
 
367
 
 
390
  examples=example_files, # Add the example files
391
 
392
  # outputs=gr.File(label="Download Processed Excel File"), # File download output
393
+ # outputs=gr.File(label="Download the processed Excel File containing the ** Project Proposals ** for each Location~Problem paired combination"), # File download output
394
 
395
+ outputs=[
396
+ gr.File(label="Download the processed Excel File containing the ** Project Proposals ** for each Location~Problem paired combination"), # File download output
397
+ gr.Textbox(label="Console Messages", lines=10, interactive=False) # Console messages output
398
+ ],
399
 
400
  # title="Excel File Uploader",
401
  # title="Upload Excel file containing #TaxDirections → Download HyperLocal Project Proposals\n",