--- 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