hieu3636 commited on
Commit
99fe9be
·
verified ·
1 Parent(s): c39c97b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,7 +12,8 @@ N_FEATURES = model.input_shape[1]
12
 
13
  def predict_csv(file):
14
  df = pd.read_csv(file)
15
-
 
16
  # Check number of features
17
  if df.shape[1] != N_FEATURES:
18
  return f"Expected {N_FEATURES} features, but got {df.shape[1]} columns."
 
12
 
13
  def predict_csv(file):
14
  df = pd.read_csv(file)
15
+ # Drop label column
16
+ df = df.drop(columns=["Label", "label", "Class", "class"], errors="ignore")
17
  # Check number of features
18
  if df.shape[1] != N_FEATURES:
19
  return f"Expected {N_FEATURES} features, but got {df.shape[1]} columns."