seifbenayed commited on
Commit
c10d9c6
·
1 Parent(s): 83ba4a0
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -26,9 +26,6 @@ import gradio as gr
26
  from PIL import Image
27
  from torchvision import transforms
28
 
29
- DEFAULT_DAMAGE_MODEL_PATH = "./model_final.pth" # Replace with your actual path
30
- DEFAULT_DEEPFAKE_MODEL_PATH = "./PoseEfficientNet_custom_laanet_model_final.pth" # Replace with your actual path
31
- DEFAULT_DEEPFAKE_CFG_PATH = "./configs/detector2.yaml" # Replace with your actual path
32
 
33
 
34
  # Add current directory to path
@@ -510,7 +507,11 @@ def process_image(input_image, damage_model_path, deepfake_model_path, deepfake_
510
  return result_img, "\n".join(progress_info)
511
 
512
 
513
- def create_gradio_interface():
 
 
 
 
514
  with gr.Blocks(title="Car Damage & Deepfake Detection") as app:
515
  gr.Markdown("# Car Damage Detection & Deepfake Verification")
516
  gr.Markdown("Upload an image to detect car damage and check if it's a deepfake")
 
26
  from PIL import Image
27
  from torchvision import transforms
28
 
 
 
 
29
 
30
 
31
  # Add current directory to path
 
507
  return result_img, "\n".join(progress_info)
508
 
509
 
510
+ DEFAULT_DAMAGE_MODEL_PATH = "./model_final.pth" # Replace with your actual path
511
+ DEFAULT_DEEPFAKE_MODEL_PATH = "./PoseEfficientNet_custom_laanet_model_final.pth" # Replace with your actual path
512
+ DEFAULT_DEEPFAKE_CFG_PATH = "./configs/detector2.yaml" # Replace with your actual path
513
+
514
+ def create_gradio_interface():
515
  with gr.Blocks(title="Car Damage & Deepfake Detection") as app:
516
  gr.Markdown("# Car Damage Detection & Deepfake Verification")
517
  gr.Markdown("Upload an image to detect car damage and check if it's a deepfake")