Spaces:
Paused
Paused
updated app.py
Browse files
app.py
CHANGED
@@ -29,16 +29,16 @@ ROOT = HERE.parent
|
|
29 |
|
30 |
logger = logging.getLogger(__name__)
|
31 |
|
32 |
-
ONNX_MODEL_URL = "https://github.com/spmallick/learnopencv/raw/master/
|
33 |
ONNX_MODEL_LOCAL_PATH = ROOT / "./emotion-ferplus-8.onnx"
|
34 |
-
CAFFE_MODEL_URL = "https://github.com/spmallick/learnopencv/raw/master/
|
35 |
CAFFE_MODEL_LOCAL_PATH = ROOT / "./RFB-320/RFB-320.caffemodel"
|
36 |
PROTOTXT_URL = "https://github.com/spmallick/learnopencv/raw/master/Facial-Emotion-Recognition/RFB-320/RFB-320.prototxt" # noqa: E501
|
37 |
PROTOTXT_LOCAL_PATH = ROOT / "./RFB-320/RFB-320.prototxt.txt"
|
38 |
|
39 |
-
download_file(ONNX_MODEL_URL, ONNX_MODEL_LOCAL_PATH
|
40 |
-
download_file(CAFFE_MODEL_URL, CAFFE_MODEL_LOCAL_PATH
|
41 |
-
download_file(PROTOTXT_URL, PROTOTXT_LOCAL_PATH
|
42 |
|
43 |
# Session-specific caching
|
44 |
onnx_cache_key = "onnx_model"
|
|
|
29 |
|
30 |
logger = logging.getLogger(__name__)
|
31 |
|
32 |
+
ONNX_MODEL_URL = "https://github.com/spmallick/learnopencv/raw/master/Facial-Emotion-Recognition/emotion-ferplus-8.onnx" # noqa: E501
|
33 |
ONNX_MODEL_LOCAL_PATH = ROOT / "./emotion-ferplus-8.onnx"
|
34 |
+
CAFFE_MODEL_URL = "https://github.com/spmallick/learnopencv/raw/master/Facial-Emotion-Recognition/RFB-320/RFB-320.caffemodel" # noqa: E501
|
35 |
CAFFE_MODEL_LOCAL_PATH = ROOT / "./RFB-320/RFB-320.caffemodel"
|
36 |
PROTOTXT_URL = "https://github.com/spmallick/learnopencv/raw/master/Facial-Emotion-Recognition/RFB-320/RFB-320.prototxt" # noqa: E501
|
37 |
PROTOTXT_LOCAL_PATH = ROOT / "./RFB-320/RFB-320.prototxt.txt"
|
38 |
|
39 |
+
download_file(ONNX_MODEL_URL, ONNX_MODEL_LOCAL_PATH, expected_size=None)
|
40 |
+
download_file(CAFFE_MODEL_URL, CAFFE_MODEL_LOCAL_PATH, expected_size=None)
|
41 |
+
download_file(PROTOTXT_URL, PROTOTXT_LOCAL_PATH, expected_size=None)
|
42 |
|
43 |
# Session-specific caching
|
44 |
onnx_cache_key = "onnx_model"
|