SantanuBanerjee commited on
Commit
1a5796d
·
verified ·
1 Parent(s): b5e1ffa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.name)
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="file", 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."
 
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."