seifbenayed commited on
Commit
54d7894
·
verified ·
1 Parent(s): 57d1f17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -158,9 +158,9 @@ def process_image(input_image, damage_model_path, deepfake_model_path, deepfake_
158
  return demo_mode_process(input_image)
159
 
160
  # Default model paths if not provided
161
- damage_model_path = damage_model_path or "./training/output/model_final.pth"
162
- deepfake_model_path = deepfake_model_path or "./logs/13-04-2025/PoseEfficientNet_custom_laanet_model_final.pth"
163
- deepfake_cfg_path = deepfake_cfg_path or "./training/configs/detector/detector2.yaml"
164
 
165
  # Check if we're running in demo mode (no real models available)
166
  models_exist, model_status = check_model_files(damage_model_path, deepfake_model_path, deepfake_cfg_path)
@@ -219,9 +219,9 @@ def create_gradio_interface():
219
  status_message += "❌ Custom models module import failed - check your installation\n"
220
 
221
  # Check default model paths
222
- default_damage_path = "./training/output/model_final.pth"
223
- default_deepfake_path = "./logs/13-04-2025/PoseEfficientNet_custom_laanet_model_final.pth"
224
- default_config_path = "./training/configs/detector/detector2.yaml"
225
 
226
  # Make sure we have a safe version of check_model_files
227
  try:
@@ -234,7 +234,7 @@ def create_gradio_interface():
234
  model_status = []
235
 
236
  # Check if example images exist
237
- example_images = ["examples/car_damage1.jpg", "examples/car_damage2.jpg"]
238
  valid_examples = []
239
  example_status = []
240
 
 
158
  return demo_mode_process(input_image)
159
 
160
  # Default model paths if not provided
161
+ damage_model_path = damage_model_path or "./model_final.pth"
162
+ deepfake_model_path = deepfake_model_path or "./PoseEfficientNet_custom_laanet_model_final.pth"
163
+ deepfake_cfg_path = deepfake_cfg_path or "./configs/detector/detector2.yaml"
164
 
165
  # Check if we're running in demo mode (no real models available)
166
  models_exist, model_status = check_model_files(damage_model_path, deepfake_model_path, deepfake_cfg_path)
 
219
  status_message += "❌ Custom models module import failed - check your installation\n"
220
 
221
  # Check default model paths
222
+ default_damage_path = "./output/model_final.pth"
223
+ default_deepfake_path = "./PoseEfficientNet_custom_laanet_model_final.pth"
224
+ default_config_path = "./configs/detector/detector2.yaml"
225
 
226
  # Make sure we have a safe version of check_model_files
227
  try:
 
234
  model_status = []
235
 
236
  # Check if example images exist
237
+ example_images = ["./test5.png", "./test3.png"]
238
  valid_examples = []
239
  example_status = []
240