AshanGimhana commited on
Commit
6970eba
1 Parent(s): c48cb63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -38,16 +38,16 @@ login(token=os.getenv("TOKENKEY"))
38
 
39
  # If 'mse' is a custom function needed,
40
  #custom_objects = {'mse': MeanSquaredError()}
41
- new_age_model = load_model("age_prediction_model.h5")
42
 
43
  # Download models from Huggingface
44
- #age_prototxt = hf_hub_download(repo_id="AshanGimhana/Age_Detection_caffe", filename="age.prototxt")
45
- #caffe_model = hf_hub_download(repo_id="AshanGimhana/Age_Detection_caffe", filename="dex_imdb_wiki.caffemodel")
46
  sam_ffhq_aging = hf_hub_download(repo_id="AshanGimhana/Face_Agin_model", filename="sam_ffhq_aging.pt")
47
 
48
 
49
  # Age prediction model setup
50
- # age_net = cv2.dnn.readNetFromCaffe(age_prototxt, caffe_model)
51
 
52
  # Face detection and landmarks predictor setup
53
  detector = dlib.get_frontal_face_detector()
 
38
 
39
  # If 'mse' is a custom function needed,
40
  #custom_objects = {'mse': MeanSquaredError()}
41
+ #new_age_model = load_model("age_prediction_model.h5")
42
 
43
  # Download models from Huggingface
44
+ age_prototxt = hf_hub_download(repo_id="AshanGimhana/Age_Detection_caffe", filename="age.prototxt")
45
+ caffe_model = hf_hub_download(repo_id="AshanGimhana/Age_Detection_caffe", filename="dex_imdb_wiki.caffemodel")
46
  sam_ffhq_aging = hf_hub_download(repo_id="AshanGimhana/Face_Agin_model", filename="sam_ffhq_aging.pt")
47
 
48
 
49
  # Age prediction model setup
50
+ age_net = cv2.dnn.readNetFromCaffe(age_prototxt, caffe_model)
51
 
52
  # Face detection and landmarks predictor setup
53
  detector = dlib.get_frontal_face_detector()