Dhanushlevi commited on
Commit
a245baf
·
verified ·
1 Parent(s): 0f503d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -71,12 +71,12 @@ gender_model.fc = nn.Sequential(
71
  nn.Dropout(0.4),
72
  nn.Linear(in_features=512, out_features=2, bias=False)
73
  )
74
- age_model.load_state_dict(torch.load('E:/Drive D/barchart/age models/age_mobile_V_1.1/PT/agetest_mobilevit_V_1.1.pt', map_location=torch.device('cpu')))
75
- gender_model.load_state_dict(torch.load('E:/Drive D/barchart/gender models/gender_mobilevit_version_1.1/pt/gendertest_mobilevit_V_1.1.pt', map_location=torch.device('cpu')))
76
 
77
  # Load the violence detection model
78
- violence_model = load_model('E:/TNIBF/modelnew (1).h5')
79
- MODEL = "E:/TNIBF/yolov8_people.pt"
80
  yolo_model = YOLO(MODEL)
81
 
82
  # Function to preprocess image for detection
 
71
  nn.Dropout(0.4),
72
  nn.Linear(in_features=512, out_features=2, bias=False)
73
  )
74
+ age_model.load_state_dict(torch.load('agetest_mobilevit_V_1.1.pt', map_location=torch.device('cpu')))
75
+ gender_model.load_state_dict(torch.load('gendertest_mobilevit_V_1.1.pt', map_location=torch.device('cpu')))
76
 
77
  # Load the violence detection model
78
+ violence_model = load_model('modelnew.h5')
79
+ MODEL = "yolov8_people.pt"
80
  yolo_model = YOLO(MODEL)
81
 
82
  # Function to preprocess image for detection