π§ Double Model
A tiny demonstration model that simply doubles any number you give it.
This is not a machine learning model, but a toy example to show how to upload custom models to Hugging Face Hub.
π¦ How It Works
The model has one method:
def predict(number):
return number * 2
Thatβs it. No training, no weights β just logic.
π οΈ Usage Example
from double_model import DoubleModel
model = DoubleModel()
print(model.predict(10)) # β 20
If you're loading from a .pkl
file:
import pickle
with open("double_model.pkl", "rb") as f:
model = pickle.load(f)
print(model.predict(7)) # β 14
π Files Included
double_model.py
β the model classdouble_model.pkl
β the pickled version of the modelREADME.md
β model card
π License
This project is licensed under the MIT License.
β¨ Why This Exists
To demonstrate:
- How to create simple Python-based models
- How to package and upload to Hugging Face Hub
- How even non-ML logic can be versioned and shared like models
π€ Author
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support