jayebaku commited on
Commit
6890e02
·
verified ·
1 Parent(s): f988ad7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -13,9 +13,8 @@ def load_and_classify_csv(file, text_field, event_model):
13
  filepath = file.name
14
  if ".csv" in filepath:
15
  df = pd.read_csv(filepath)
16
- else ".tsv" in filepath:
17
  df = pd.read_table(filepath)
18
- # print(file.name)
19
 
20
  if text_field not in df.columns:
21
  raise gr.Error(f"Error: Enter text column'{text_field}' not in CSV file.")
 
13
  filepath = file.name
14
  if ".csv" in filepath:
15
  df = pd.read_csv(filepath)
16
+ else:
17
  df = pd.read_table(filepath)
 
18
 
19
  if text_field not in df.columns:
20
  raise gr.Error(f"Error: Enter text column'{text_field}' not in CSV file.")