syurek commited on
Commit
a6d2392
·
verified ·
1 Parent(s): 9041514

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ def answer_question(file, question):
12
  if file is None:
13
  return "Lütfen önce bir CSV dosyası yükleyin."
14
 
15
- # Dosyayı aç ve CSV olarak yükle
16
- df = pd.read_csv(file.name, encoding='ISO-8859-1', sep=';', error_bad_lines=False, quoting=csv.QUOTE_NONE)
17
 
18
  # CSV verisini metne dönüştür
19
  context = df.to_string(index=False)
 
12
  if file is None:
13
  return "Lütfen önce bir CSV dosyası yükleyin."
14
 
15
+ # Dosyayı aç ve CSV olarak yükle, hatalı satırları atla
16
+ df = pd.read_csv(file.name, encoding='ISO-8859-1', sep=';', on_bad_lines='skip', quoting=csv.QUOTE_NONE)
17
 
18
  # CSV verisini metne dönüştür
19
  context = df.to_string(index=False)