CoolFace
Apppublic

Hishamot/Earth_Science_experiment

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
App README

Random Forest Model Explorer

A Gradio-based web app for geochemical rock classification using a pre-trained Random Forest model.

๐Ÿš€ How to Run

bash
pip install gradio pandas matplotlib scikit-learn joblib
python app.py

๐Ÿ“‹ Input Data Format

Your CSV file must follow this format:

First Column โ€” Class Label

  • โ€”Must be integer cluster/class IDs (e.g., 0, 1, 2)
  • โ€”Used as ground-truth labels for evaluation

Required Feature Columns (24 total)

CategoryColumns
Major OxidesSiO2, TiO2, Al2O3, Fe2O3, MgO, CaO, Na2O, K2O
Rare Earth ElementsLa, Ce, Nd, Sm, Gd, Yb, Lu
Trace ElementsBa, Hf, Nb, Rb, Sr, Ta, Th, Y, Zr

Rules

  • โ€”Column names are case-sensitive
  • โ€”No missing values (NaN) allowed
  • โ€”Values must be numeric (raw, unscaled)
  • โ€”The app applies MinMax scaling internally

Example Header

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference