Views
No views yet
1from huggingface_hub import hf_hub_download
2import tensorflow as tf
3import pickle
4
5# Download model
6model_path = hf_hub_download(repo_id="Kruti1234/mindcare-audio-emotion", filename="mindcare_audio_emotion_model.h5")
7model = tf.keras.models.load_model(model_path)
8
9# Download label encoder
10encoder_path = hf_hub_download(repo_id="Kruti1234/mindcare-audio-emotion", filename="audio_label_encoder.pkl")
11with open(encoder_path, 'rb') as f:
12 label_encoder = pickle.load(f)