Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,18 +63,24 @@ def process_excel(file):
|
|
| 63 |
except Exception as e:
|
| 64 |
return str(e) # Return the error message
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
# Define the Gradio interface
|
| 67 |
interface = gr.Interface(
|
| 68 |
fn=process_excel, # The function to process the uploaded file
|
| 69 |
inputs=gr.File(type="filepath", label="Upload Excel File"), # File upload input
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
outputs=gr.File(label="Download Processed Excel File"), # File download output
|
| 72 |
title="Excel File Uploader",
|
| 73 |
-
description="Upload an Excel file to process and download the result."
|
| 74 |
-
|
| 75 |
-
# outputs="dataframe", # Display the output as a DataFrame
|
| 76 |
-
# title="Excel File Uploader",
|
| 77 |
-
# description="Upload an Excel file to see the first few rows."
|
| 78 |
)
|
| 79 |
|
| 80 |
# Launch the interface
|
|
|
|
| 63 |
except Exception as e:
|
| 64 |
return str(e) # Return the error message
|
| 65 |
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
example_files = ['#TaxDirection (Responses)_Example1.xlsx', ]
|
| 72 |
+
|
| 73 |
# Define the Gradio interface
|
| 74 |
interface = gr.Interface(
|
| 75 |
fn=process_excel, # The function to process the uploaded file
|
| 76 |
inputs=gr.File(type="filepath", label="Upload Excel File"), # File upload input
|
| 77 |
+
|
| 78 |
+
examples=example_files, # Add the example files
|
| 79 |
+
|
| 80 |
outputs=gr.File(label="Download Processed Excel File"), # File download output
|
| 81 |
title="Excel File Uploader",
|
| 82 |
+
# description="Upload an Excel file to process and download the result.",
|
| 83 |
+
description="Upload an Excel file to process and download the result or use the example files (click on anyone of them)."
|
|
|
|
|
|
|
|
|
|
| 84 |
)
|
| 85 |
|
| 86 |
# Launch the interface
|