TaxDirection / app.py
SantanuBanerjee's picture
Update app.py
bddf29f verified
raw
history blame
683 Bytes
import gradio as gr
import pandas as pd
def process_excel(file):
# Read the Excel file
df = pd.read_excel(file.name)
# Perform any processing on the DataFrame here
return df.head() # Return the first few rows as an example
# Define the Gradio interface
interface = gr.Interface(
fn=process_excel, # The function to process the uploaded file
inputs=gr.File(type="file", label="Upload Excel File"), # File upload input
outputs="dataframe", # Display the output as a DataFrame
title="Excel File Uploader",
description="Upload an Excel file to see the first few rows."
)
# Launch the interface
if __name__ == "__main__":
interface.launch()