mkhodary101 commited on
Commit
a202a4e
·
verified ·
1 Parent(s): f97e575

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -408,7 +408,7 @@ def process_video(feature, video):
408
  }
409
  try:
410
  detector = detectors[feature]()
411
- method_name = "detect_intrusion" if feature == "Intrusion Detection" else feature.lower().replace(" ", "_")
412
  output_path = getattr(detector, method_name)(video)
413
  return f"{feature} completed successfully", output_path
414
  except Exception as e:
 
408
  }
409
  try:
410
  detector = detectors[feature]()
411
+ method_name = feature.lower().replace(" ", "_").replace("detection", "detect") # Ensures correct method name
412
  output_path = getattr(detector, method_name)(video)
413
  return f"{feature} completed successfully", output_path
414
  except Exception as e: