File size: 1,411 Bytes
32ff4cb be61043 32ff4cb be61043 32ff4cb be61043 32ff4cb be61043 32ff4cb be61043 32ff4cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
---
language: "en"
license: "mit"
tags:
- toy-model
- beginner
- number
- demo
- simple
model_type: "custom"
pipeline_tag: "other"
---
# ๐ง 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](https://huggingface.co/).
---
## ๐ฆ How It Works
The model has one method:
```python
def predict(number):
return number * 2
```
Thatโs it. No training, no weights โ just logic.
---
## ๐ ๏ธ Usage Example
```python
from double_model import DoubleModel
model = DoubleModel()
print(model.predict(10)) # โ 20
```
If you're loading from a `.pkl` file:
```python
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 class
- `double_model.pkl` โ the pickled version of the model
- `README.md` โ model card
---
## ๐ License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
---
## โจ 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
[goldendevuz](https://huggingface.co/goldendevuz)
|