aisltnab commited on
Commit
eae2950
·
verified ·
1 Parent(s): e5dbe3b

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +5 -6
run.py CHANGED
@@ -25,12 +25,11 @@ import pandas as pd
25
  def upload_file(files):
26
  file_paths = [file.name for file in files]
27
  print(file_paths, file_paths[0][-3:])
28
- if file_paths[0][-3:] == 'csv':
29
- df = pd.read_csv(file_paths[0])
30
- print(df)
31
- df.to_csv('test1.csv')
32
- df.to_csv(file_paths[0].replace('.csv','_')+'test2.csv')
33
- print([file.name for file in files])
34
  return file_paths
35
 
36
  with gr.Blocks() as demo:
 
25
  def upload_file(files):
26
  file_paths = [file.name for file in files]
27
  print(file_paths, file_paths[0][-3:])
28
+ df = pd.read_csv(file_paths[0])
29
+ print(df)
30
+ df.to_csv('test1.csv')
31
+ df.to_csv(file_paths[0].replace('.csv','_')+'test2.csv')
32
+ print([file.name for file in files])
 
33
  return file_paths
34
 
35
  with gr.Blocks() as demo: