gaur3009 commited on
Commit
9018f8f
·
verified ·
1 Parent(s): 3675b89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -64,11 +64,11 @@ class GANRiskAnalyzer:
64
  def analyze_financial_data(file):
65
  try:
66
  # Read the uploaded CSV file
67
- data = pd.read_csv(file.name, encoding="utf-8", error_bad_lines=False)
68
  except UnicodeDecodeError:
69
  # Fallback for non-UTF-8 encoding
70
  try:
71
- data = pd.read_csv(file.name, encoding="ISO-8859-1", error_bad_lines=False)
72
  except Exception as e:
73
  return {"error": f"Failed to read file: {str(e)}"}
74
  except Exception as e:
 
64
  def analyze_financial_data(file):
65
  try:
66
  # Read the uploaded CSV file
67
+ data = pd.read_csv(file.name, encoding="utf-8", on_bad_lines='skip')
68
  except UnicodeDecodeError:
69
  # Fallback for non-UTF-8 encoding
70
  try:
71
+ data = pd.read_csv(file.name, encoding="ISO-8859-1", on_bad_lines='skip')
72
  except Exception as e:
73
  return {"error": f"Failed to read file: {str(e)}"}
74
  except Exception as e: