--- title: Nutrition Regression emoji: 🚀 colorFrom: blue colorTo: green sdk: gradio sdk_version: 5.16.0 app_file: app.py pinned: false license: apache-2.0 --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference --- title: Nutrition Density Prediction App emoji: 🍏 colorFrom: "#4CAF50" colorTo: "#8BC34A" sdk: gradio sdk_version: "3.0.0" app_file: app.py pinned: false --- # Nutrition Density Prediction App This app predicts the **Nutrition Density** based on 10 selected nutrition features using either the **SVR** (Support Vector Regression) or **Linear Regression** model. The user can interact with the app by adjusting sliders for key nutrition features and selecting a model to predict the Nutrition Density. ## How It Works 1. **Model Selection**: Choose between two models - **SVR** or **Linear Regression**. 2. **Adjust Nutrition Features**: Adjust the following 10 key nutrition features using sliders: - **Caloric Value** - **Fat** - **Saturated Fats** - **Carbohydrates** - **Sugars** - **Protein** - **Cholesterol** - **Sodium** - **Calcium** - **Iron** 3. **Prediction**: Once the features are set, click on **"Predict"**. The selected model will calculate and display the Nutrition Density based on the inputs. 4. **Clear**: Reset the inputs to default values by clicking the **"Clear"** button. ## Deployment on Hugging Face Spaces This app is deployed on [Hugging Face Spaces](https://huggingface.co/spaces), allowing users to interact with it easily via a web interface. To use the app, follow these steps: 1. Visit the Hugging Face Spaces page for this app: [Your Hugging Face Space Link]() 2. **Adjust the Sliders**: Choose your desired nutrition values for Caloric Value, Fat, Saturated Fats, Carbohydrates, Sugars, Protein, Cholesterol, Sodium, Calcium, and Iron. 3. **Select the Model**: Choose between **SVR** or **Linear Regression**. 4. **Click "Predict"**: The app will calculate the Nutrition Density based on your selections. 5. **Clear Inputs**: Reset all values to their initial state by clicking the **"Clear"** button. ## How to Run Locally (Optional) If you'd like to run the app on your local machine, follow these instructions: ### Prerequisites - Python 3.x ### Installation Steps 1. Clone the repository: ```bash git clone cd