Audio Classification
Keras
English
heart-murmur
deep-learning
lstm
healthcare-ai
audio-processing
librosa
tensorflow
Instructions to use zaheerjk/AI-Powered-Heart-Murmur-Detection-System with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use zaheerjk/AI-Powered-Heart-Murmur-Detection-System with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://zaheerjk/AI-Powered-Heart-Murmur-Detection-System") - Notebooks
- Google Colab
- Kaggle
| import tensorflow as tf | |
| import streamlit as st | |
| from huggingface_hub import hf_hub_download | |
| from config import HF_REPO_ID,HF_MODEL_FILENAME | |
| from utils.logger import setup_logger | |
| logger=setup_logger('ModelLoader') | |
| def load_model(): | |
| try: | |
| logger.info("Downloading model form hugging Face Hub") | |
| model_path=hf_hub_download( | |
| repo_id=HF_REPO_ID, | |
| filename=HF_MODEL_FILENAME, | |
| repo_type='model' | |
| ) | |
| logger.info("Loading Tensorflow model") | |
| model=tf.keras.models.load_model(model_path) | |
| model.compile( | |
| optimizer="adam", | |
| loss="categorical_crossentropy", | |
| metrics=["accuracy"] | |
| ) | |
| logger.info("Model LOad Sucessfully") | |
| return model | |
| except Exception as e: | |
| logger.exception("Failed to load model") | |
| st.error("❌ Failed to load the ML model. Please try again later.") | |
| raise e |