AshanGimhana
commited on
Commit
•
c48cb63
1
Parent(s):
0670f39
Update app.py
Browse files
app.py
CHANGED
@@ -36,14 +36,15 @@ from models.psp import pSp
|
|
36 |
# Huggingface login
|
37 |
login(token=os.getenv("TOKENKEY"))
|
38 |
|
|
|
|
|
|
|
|
|
39 |
# Download models from Huggingface
|
40 |
#age_prototxt = hf_hub_download(repo_id="AshanGimhana/Age_Detection_caffe", filename="age.prototxt")
|
41 |
#caffe_model = hf_hub_download(repo_id="AshanGimhana/Age_Detection_caffe", filename="dex_imdb_wiki.caffemodel")
|
42 |
sam_ffhq_aging = hf_hub_download(repo_id="AshanGimhana/Face_Agin_model", filename="sam_ffhq_aging.pt")
|
43 |
|
44 |
-
# If 'mse' is a custom function needed,
|
45 |
-
#custom_objects = {'mse': MeanSquaredError()}
|
46 |
-
new_age_model = load_model("age_prediction_model.h5")
|
47 |
|
48 |
# Age prediction model setup
|
49 |
# age_net = cv2.dnn.readNetFromCaffe(age_prototxt, caffe_model)
|
|
|
36 |
# Huggingface login
|
37 |
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)
|