Spaces:
Runtime error
Runtime error
Download Helper_Functions.py from duol/Gunshot_Detection_System: direct link, hf CLI and curl.
- Browser
- Download file 456 Bytes
-
https://huggingface.co/spaces/duol/Gunshot_Detection_System/resolve/main/Helper_Functions.py
- Command line
-
hf download hf://spaces/duol/Gunshot_Detection_System/Helper_Functions.py
-
curl -L -o Helper_Functions.py https://huggingface.co/spaces/duol/Gunshot_Detection_System/resolve/main/Helper_Functions.py
456 Bytes
| from keras.models import model_from_json | |
| import joblib | |
| import librosa | |
| def load_model(): | |
| # Load model architecture from JSON file | |
| # with open('CNN_Raw.json', 'r') as json_file: | |
| # loaded_model_json = json_file.read() | |
| # loaded_model = model_from_json(loaded_model_json) | |
| # | |
| # # Load weights into the model | |
| # loaded_model.load_weights("CNN_Raw.h5") | |
| loaded_model = joblib.load('pipeline.joblib') | |
| return loaded_model | |