Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.25.0
title: ML Model Comparison Tool
emoji: 🔥
colorFrom: red
colorTo: green
sdk: gradio
sdk_version: 6.14.0
python_version: '3.13'
app_file: app.py
pinned: false
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
AI Model Comparison App
A Machine Learning web application built using Python and Gradio.
This project allows users to compare multiple Machine Learning models on different datasets for both Classification and Regression tasks.
Features
Classification
Users can choose one of the following datasets:
- Iris Dataset
- Breast Cancer Dataset
- Titanic Dataset
Regression
Users can choose one of the following datasets:
- California Housing Dataset
- Diabetes Dataset
- Boston Housing Dataset
Machine Learning Models
Classification Models
- Logistic Regression
- Decision Tree Classifier
- Random Forest Classifier
- K-Nearest Neighbors (KNN)
Regression Models
- Linear Regression
- Decision Tree Regressor
- Random Forest Regressor
- Support Vector Regressor (SVR)
Technologies Used
- Python
- Scikit-learn
- Pandas
- Gradio
- Hugging Face Spaces
Project Structure
├── app.py
├── requirements.txt
├── README.md
Installation
Clone the Repository
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
Install Required Libraries
pip install -r requirements.txt
Run the Application
python app.py
Hugging Face Deployment
Steps
- Create a new Space on Hugging Face
- Choose:
- SDK: Gradio
- Upload these files:
- app.py
- requirements.txt
- README.md
- Wait for automatic deployment
How the Application Works
Step 1
Select the task type:
- Classification
- Regression
Step 2
Choose a dataset
Step 3
Click the button to run the models
Step 4
The application will:
- Train multiple machine learning models
- Compare their performance
- Display the evaluation results
- Show the best-performing model
Datasets Used
Classification Datasets
Iris Dataset
A famous dataset used for flower classification.
Breast Cancer Dataset
Used to classify tumors as malignant or benign.
Titanic Dataset
Predicts passenger survival on the Titanic.
Regression Datasets
California Housing Dataset
Predicts housing prices in California districts.
Diabetes Dataset
Predicts disease progression measurements.
Boston Housing Dataset
Predicts house prices using multiple features.
Evaluation Metrics
Classification
- Accuracy Score
Regression
- R² Score
- Mean Squared Error (MSE)
Future Improvements
- Add more datasets
- Add XGBoost and LightGBM
- Allow users to upload custom datasets
- Add graphs and visualizations
- Generate downloadable reports
- Deploy with a custom UI design
Example Use Case
A user selects:
- Task Type: Classification
- Dataset: Iris Dataset
The app trains:
- Logistic Regression
- Decision Tree
- Random Forest
- KNN
Then compares their accuracy scores and displays the best model.
Author
Saja
- Master’s Student in Artificial Intelligence