SailajaS commited on
Commit
451a6aa
·
verified ·
1 Parent(s): 4da6b1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -39,12 +39,12 @@ def download_dataset():
39
  # ✅ Download dataset at startup
40
  download_dataset()
41
 
42
- # ✅ Load dataset with error handling
43
  try:
44
- df = pd.read_csv(DATASET_PATH, encoding="utf-8", delimiter=",", error_bad_lines=False)
45
  except:
46
  try:
47
- df = pd.read_csv(DATASET_PATH, encoding="utf-8", delimiter=";", error_bad_lines=False)
48
  except:
49
  raise Exception("❌ Unable to read CSV. Check delimiter and format.")
50
 
 
39
  # ✅ Download dataset at startup
40
  download_dataset()
41
 
42
+ # ✅ Load dataset with proper error handling
43
  try:
44
+ df = pd.read_csv(DATASET_PATH, encoding="utf-8", delimiter=",", on_bad_lines="skip")
45
  except:
46
  try:
47
+ df = pd.read_csv(DATASET_PATH, encoding="utf-8", delimiter=";", on_bad_lines="skip")
48
  except:
49
  raise Exception("❌ Unable to read CSV. Check delimiter and format.")
50