Instructions to use ghafil/AiroDx-API with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use ghafil/AiroDx-API with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://ghafil/AiroDx-API") - Notebooks
- Google Colab
- Kaggle
Download Dockerfile from ghafil/AiroDx-API: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/ghafil/AiroDx-API/resolve/main/Dockerfile
- Command line
-
hf download hf://ghafil/AiroDx-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/ghafil/AiroDx-API/resolve/main/Dockerfile
858 Bytes
| # Use official lightweight Python image | |
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV TF_CPP_MIN_LOG_LEVEL=2 | |
| ENV TF_ENABLE_ONEDNN_OPTS=0 | |
| # Create a working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the model files directly into the image (Since it's only ~92MB!) | |
| COPY model/ ./model/ | |
| # Copy your application code | |
| COPY app.py . | |
| # Expose the port FastAPI runs on | |
| EXPOSE 8000 | |
| # Command to run the application using uvicorn (Simpler for HuggingFace) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |