--- title: Data2Model emoji: ๐ colorFrom: indigo colorTo: red sdk: docker app_port: 7860 pinned: false license: mit short_description: Upload data, train models, deploy instantly tags: - machine-learning - automl - flask - scikit-learn - classification - regression - clustering --- # ๐ Data2Model **Automated Machine Learning Pipeline โ From Raw Data to Deployable Web App** Upload a dataset โ Configure preprocessing โ Train models โ Download a ready-to-deploy prediction app --- ## โจ Features | Feature | Description | |---|---| | **One-Click AutoML** | Upload CSV/Excel/JSON and automatically train & compare 8+ ML algorithms | | **Smart Type Detection** | Automatically distinguishes numeric vs categorical columns with manual override | | **Per-Column Preprocessing** | Configure scaling (Standard, MinMax, Robust, Normalizer) and encoding (One-Hot, Label, Ordinal, Binary) individually per column | | **Flexible Null Handling** | Per-column imputation: mean, median, mode, custom constant, or row deletion | | **Column Dropping** | Exclude irrelevant columns (IDs, timestamps, etc.) before training | | **Flexible Data Splits** | Train/Test or Train/Test/Validation with configurable percentages | | **Data Dashboard** | Auto-generated visualizations: histograms, correlation heatmaps, distributions | | **Deployable App Export** | Download a complete Flask web app (ZIP) with your trained model built-in | | **Prediction Interface** | Upload new data for batch predictions with a trained model | | **Auto Cleanup** | Uploaded datasets are automatically deleted after training and on server shutdown | ## ๐ง Supported Algorithms ### Classification Logistic Regression ยท Random Forest ยท Gradient Boosting ยท Decision Tree ยท KNN ยท Naive Bayes ยท SVM ยท AdaBoost ยท XGBoost ยท LightGBM ### Regression Linear Regression ยท Random Forest ยท Gradient Boosting ยท Decision Tree ยท KNN ยท SVR ยท AdaBoost ยท XGBoost ยท LightGBM ### Unsupervised K-Means ยท DBSCAN ยท Agglomerative Clustering ยท PCA --- ## ๐ง How to Use 1. **Upload** โ Drop your CSV, Excel, or JSON dataset 2. **Configure** โ Set null handling, scaling, encoding, and column selection per column 3. **Train** โ Choose problem type, target column, and data split strategy 4. **Evaluate** โ View metrics (Accuracy, F1, Rยฒ, RMSE) and preprocessing summary 5. **Deploy** โ Download the trained model or a complete Flask prediction app (ZIP) ## ๐ Project Structure ``` โโโ app.py # Flask web application โโโ model_pipeline.py # AutoML pipeline engine โโโ Dockerfile # Container configuration for HF Spaces โโโ requirements.txt # Python dependencies โโโ templates/ # Jinja2 HTML templates โ โโโ base.html # Base layout โ โโโ index.html # Home / upload page โ โโโ configure.html # Preprocessing & training config โ โโโ result.html # Training results & metrics โ โโโ predict.html # Prediction interface โ โโโ ... # About, docs, feedback, error pages โโโ static/ # CSS & JavaScript โโโ uploads/ # Temporary uploads (auto-cleaned) โโโ saved_models/ # Trained models & deployable ZIPs ``` ## ๐ก๏ธ Data Privacy - Uploaded datasets are **never stored permanently** - Files are deleted immediately after training completes - All remaining uploads are wiped on server shutdown --- ## ๐ป Run Locally ```bash git clone https://huggingface.co/spaces/YOUR_USERNAME/Data2Model cd Data2Model pip install -r requirements.txt python app.py ``` Open **http://localhost:5000** in your browser. ---
Built with โค๏ธ using Flask & scikit-learn