Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,14 @@ import pandas as pd
|
|
| 3 |
|
| 4 |
def process_excel(file):
|
| 5 |
# Read the Excel file
|
| 6 |
-
df = pd.read_excel(file
|
| 7 |
# Perform any processing on the DataFrame here
|
| 8 |
return df.head() # Return the first few rows as an example
|
| 9 |
|
| 10 |
# Define the Gradio interface
|
| 11 |
interface = gr.Interface(
|
| 12 |
fn=process_excel, # The function to process the uploaded file
|
| 13 |
-
inputs=gr.File(type="
|
| 14 |
outputs="dataframe", # Display the output as a DataFrame
|
| 15 |
title="Excel File Uploader",
|
| 16 |
description="Upload an Excel file to see the first few rows."
|
|
|
|
| 3 |
|
| 4 |
def process_excel(file):
|
| 5 |
# Read the Excel file
|
| 6 |
+
df = pd.read_excel(file)
|
| 7 |
# Perform any processing on the DataFrame here
|
| 8 |
return df.head() # Return the first few rows as an example
|
| 9 |
|
| 10 |
# Define the Gradio interface
|
| 11 |
interface = gr.Interface(
|
| 12 |
fn=process_excel, # The function to process the uploaded file
|
| 13 |
+
inputs=gr.File(type="filepath", label="Upload Excel File"), # File upload input
|
| 14 |
outputs="dataframe", # Display the output as a DataFrame
|
| 15 |
title="Excel File Uploader",
|
| 16 |
description="Upload an Excel file to see the first few rows."
|