Spaces:
Sleeping
Sleeping
metadata
title: Inference Studio
emoji: ⚡
colorFrom: red
colorTo: blue
sdk: docker
app_port: 7860
ML Lab Assignment | Inference Studio
A premium, highly asynchronous web interface for machine learning model inference. This project serves as a comprehensive playground for testing and interpreting three distinct predictive models using FastAPI, Jinja2, and SHAP explainability.
Features
- Multi-Model Support: Seamlessly switch between Consumer Trends, F1 Pit Strategy, and Sleep Health models.
- Deep Interpretability: Real-time SHAP Diverging Charts visualizing feature contributions.
- Neural UI/UX: Cyber-Industrial aesthetic with glassmorphism, fluid animations, and dark-mode optimization.
- Data Injection: "Auto-Inject" feature to quickly test models with real samples from the datasets.
- HuggingFace Ready: Fully containerized and optimized for deployment on HF Spaces.
Project Structure
.
├── dataset/ # Source CSV files from Kaggle
├── inference/
│ ├── app.py # FastAPI Backend with SHAP Integration
│ └── template/ # Frontend (HTML, CSS, JS)
├── notebooks/ # Jupyter Notebooks for model training
├── outputs/ # Trained model artifacts (.joblib) and performance metrics
├── Dockerfile # Multi-stage Docker configuration
├── .gitattributes # LFS tracking for datasets and models
Datasets & Models
| Model | Target | Dataset Source |
|---|---|---|
| Consumer Trends | Category Prediction | Kaggle Link |
| F1 Pit Strategy | Pit Stop Next Lap | Kaggle Link |
| Sleep Health | Sleep Disorder Classifier | Kaggle Link |
Local Development
Setup Environment:
python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install -r requirements.txtRun Server:
uvicorn inference.app:app --reloadAccess UI: Open
http://127.0.0.1:8000
Technology Stack
- Backend: FastAPI (Python 3.11)
- Explainability: SHAP (SHapley Additive exPlanations)
- Frontend: Vanilla CSS, JS (ES6+), Jinja2 Templates
- Containerization: Docker
- ML Engine: Scikit-Learn, XGBoost, Joblib
License
This project is licensed under the MIT License - see the LICENSE file for details.
Created as part of the B.Tech Semester 04 Machine Learning Lab Assignment.