vivek9 commited on
Commit
1a4c084
·
verified ·
1 Parent(s): 57b138a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -4,8 +4,7 @@ import io
4
 
5
  def read_csv(csv_file):
6
  # Convert uploaded file data to pandas DataFrame
7
- content = csv_file.getvalue().decode('utf-8')
8
- df = pd.read_csv(io.StringIO(content))
9
  return df
10
 
11
  iface = gr.Interface(fn=read_csv,
 
4
 
5
  def read_csv(csv_file):
6
  # Convert uploaded file data to pandas DataFrame
7
+ df = pd.read_csv(csv_file.name)
 
8
  return df
9
 
10
  iface = gr.Interface(fn=read_csv,