goldendevuz commited on
Commit
d72e2b4
Β·
1 Parent(s): 44a93ef

2025.07.08/15:07

Browse files
Files changed (1) hide show
  1. README.md +35 -6
README.md CHANGED
@@ -1,21 +1,31 @@
1
  ---
2
- language: "en"
3
- license: "mit"
 
 
 
 
 
 
 
 
4
  tags:
5
  - toy-model
6
  - beginner
7
  - number
8
  - demo
9
  - simple
10
- model_type: "custom"
11
- pipeline_tag: "other"
12
  ---
13
 
14
  # 🧠 Double Model
15
 
16
  A tiny demonstration model that simply **doubles any number** you give it.
17
 
18
- This is **not a machine learning model**, but a toy example to show how to upload custom models to Hugging Face Hub.
 
 
19
 
20
  ## πŸ“¦ How It Works
21
 
@@ -26,6 +36,8 @@ def predict(number):
26
  return number * 2
27
  ```
28
 
 
 
29
  ## πŸ› οΈ Usage Example
30
 
31
  ```python
@@ -34,16 +46,33 @@ model = DoubleModel()
34
  print(model.predict(10)) # ➜ 20
35
  ```
36
 
 
 
 
 
 
 
 
 
 
 
 
37
  ## πŸ“ Files Included
38
 
39
  - `double_model.py` β€” the model class
40
  - `double_model.pkl` β€” the pickled version of the model
41
- - `README.md` β€” model card
 
 
 
 
42
 
43
  ## πŸ“„ License
44
 
45
  MIT License
46
 
 
 
47
  ## πŸ€– Author
48
 
49
  [goldendevuz](https://huggingface.co/goldendevuz)
 
1
  ---
2
+ title: Double Model Demo
3
+ emoji: 🧠
4
+ colorFrom: indigo
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: "4.16.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ language: en
12
  tags:
13
  - toy-model
14
  - beginner
15
  - number
16
  - demo
17
  - simple
18
+ model_type: custom
19
+ pipeline_tag: other
20
  ---
21
 
22
  # 🧠 Double Model
23
 
24
  A tiny demonstration model that simply **doubles any number** you give it.
25
 
26
+ 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/).
27
+
28
+ ---
29
 
30
  ## πŸ“¦ How It Works
31
 
 
36
  return number * 2
37
  ```
38
 
39
+ ---
40
+
41
  ## πŸ› οΈ Usage Example
42
 
43
  ```python
 
46
  print(model.predict(10)) # ➜ 20
47
  ```
48
 
49
+ If loading from `.pkl`:
50
+
51
+ ```python
52
+ import pickle
53
+ with open("double_model.pkl", "rb") as f:
54
+ model = pickle.load(f)
55
+ print(model.predict(7)) # ➜ 14
56
+ ```
57
+
58
+ ---
59
+
60
  ## πŸ“ Files Included
61
 
62
  - `double_model.py` β€” the model class
63
  - `double_model.pkl` β€” the pickled version of the model
64
+ - `app.py` β€” Gradio web demo
65
+ - `README.md` β€” model card
66
+ - `requirements.txt` β€” Space dependencies
67
+
68
+ ---
69
 
70
  ## πŸ“„ License
71
 
72
  MIT License
73
 
74
+ ---
75
+
76
  ## πŸ€– Author
77
 
78
  [goldendevuz](https://huggingface.co/goldendevuz)