prernajeet01 commited on
Commit
484ce2d
·
verified ·
1 Parent(s): 40c771e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -198,7 +198,7 @@ def analyze_transaction_with_ai(transaction_data, suspicious_transactions, colum
198
  def load_and_preprocess_data(file):
199
  """Load and preprocess transaction data from CSV or Excel file"""
200
  if file is None:
201
- return None, None
202
 
203
  # Get file extension
204
  file_extension = os.path.splitext(file.name)[1].lower()
@@ -220,7 +220,7 @@ def load_and_preprocess_data(file):
220
 
221
  # If LLM analysis failed, perform basic preprocessing
222
  if column_mapping is None:
223
- return df, dataset_explanation
224
 
225
  # Process the data based on identified columns
226
  processed_df = df.copy()
 
198
  def load_and_preprocess_data(file):
199
  """Load and preprocess transaction data from CSV or Excel file"""
200
  if file is None:
201
+ return None, None, None # Return three values instead of two
202
 
203
  # Get file extension
204
  file_extension = os.path.splitext(file.name)[1].lower()
 
220
 
221
  # If LLM analysis failed, perform basic preprocessing
222
  if column_mapping is None:
223
+ return df, dataset_explanation, None # Return three values with column_mapping as None
224
 
225
  # Process the data based on identified columns
226
  processed_df = df.copy()