Views
No views yet
1import tensorflow as tf
2from huggingface_hub import hf_hub_download
3
4repo_id = "RayyanAhmed9477/speech-emotion-analyzer"
5filename = "cnn_emotion_model.keras"
6
7# Download the model file
8model_path = hf_hub_download(repo_id=repo_id, filename=filename)
9
10# Load the model
11model = tf.keras.models.load_model(model_path)
12
13# Now you can use the model for prediction
14# (You'll need to implement feature extraction similar to the original app)