Downloads · 30 days
0
tonyassi/sales-prediction
sales-prediction is a machine learning model from tonyassi. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This model was trained with Image Regression Model Trainer. It takes an image as input and outputs a float value.
Downloads · 30 days
0
Access
Public
Updated May 20, 2024
Parameters
86.4M
1 GB on disk
Likes
5
Public
Click a slice to open those files.
.pt687 MB · 67%
From the Hugging Face model README
This model was trained with Image Regression Model Trainer. It takes an image as input and outputs a float value.
from ImageRegression import predict
predict(repo_id='tonyassi/sales-prediction',image_path='image.jpg')
Dataset: tonyassi/clothing-sales-ds
Value Column: 'sales'
Train Test Split: 0.2
Base Model: google/vit-base-patch16-224
Epochs: 10
Learning Rate: 0.0001
git clone https://github.com/TonyAssi/ImageRegression.git
cd ImageRegression
pip install -r requirements.txt
from ImageRegression import train_model, upload_model, predict
predict(repo_id='tonyassi/sales-prediction',
image_path='image.jpg')
The first time this function is called it'll download the safetensor model. Subsequent function calls will run faster.
train_model(dataset_id='tonyassi/clothing-sales-ds',
value_column_name='sales',
test_split=0.2,
output_dir='./results',
num_train_epochs=10,
learning_rate=0.0001)
The trainer will save the checkpoints in the output_dir location. The model.safetensors are the trained weights you'll use for inference (predicton).
This function will upload your model to the 🤗 Hub.
upload_model(model_id='sales-prediction',
token='YOUR_HF_TOKEN',
checkpoint_dir='./results/checkpoint-940')