Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 "./
|
| 162 |
-
deepfake_model_path = deepfake_model_path or "./
|
| 163 |
-
deepfake_cfg_path = deepfake_cfg_path or "./
|
| 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 = "./
|
| 223 |
-
default_deepfake_path = "./
|
| 224 |
-
default_config_path = "./
|
| 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 = ["
|
| 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 |
|