espejelomar commited on
Commit
97bdb50
1 Parent(s): b45e9b4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -35
README.md CHANGED
@@ -1,46 +1,124 @@
1
  ---
2
  title: README
3
- emoji: 📊
4
  colorFrom: red
5
- colorTo: pink
6
  sdk: streamlit
7
  app_file: app.py
8
  pinned: false
9
- license: cc
10
  ---
11
 
12
- # Configuration
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- `title`: _string_
15
- Display title for the Space
16
 
17
- `emoji`: _string_
18
- Space emoji (emoji-only character allowed)
19
 
20
- `colorFrom`: _string_
21
- Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
22
-
23
- `colorTo`: _string_
24
- Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
25
-
26
- `sdk`: _string_
27
- Can be either `gradio`, `streamlit`, or `static`
28
-
29
- `sdk_version` : _string_
30
- Only applicable for `streamlit` SDK.
31
- See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
32
-
33
- `app_file`: _string_
34
- Path to your main application file (which contains either `gradio` or `streamlit` Python code, or `static` html code).
35
- Path is relative to the root of the repository.
36
-
37
- `models`: _List[string]_
38
- HF model IDs (like "gpt2" or "deepset/roberta-base-squad2") used in the Space.
39
- Will be parsed automatically from your code if not specified here.
40
-
41
- `datasets`: _List[string]_
42
- HF dataset IDs (like "common_voice" or "oscar-corpus/OSCAR-2109") used in the Space.
43
- Will be parsed automatically from your code if not specified here.
44
-
45
- `pinned`: _boolean_
46
- Whether the Space stays on top of your list.
 
1
  ---
2
  title: README
3
+ emoji: ❤️
4
  colorFrom: red
5
+ colorTo: red
6
  sdk: streamlit
7
  app_file: app.py
8
  pinned: false
 
9
  ---
10
 
11
+ <div class="lg:col-span-3">
12
+ <p class="mb-4">
13
+ Hugging Face makes it easy to collaboratively build and showcase your <a
14
+ href="https://www.sbert.net/">Sentence Transformers</a
15
+ >
16
+ models!<br />
17
+ You can collaborate with your organization, upload and showcase your own models in your profile! ❤️
18
+ </p>
19
+ </div>
20
+ <a href="https://www.sbert.net/" class="block overflow-hidden group">
21
+ <div
22
+ class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center bg-[#FA8072]"
23
+ >
24
+ <img alt="" src="https://huggingface.co/spaces/sentence-transformers/README/resolve/main/sbertLogo.png" class="w-40" />
25
+ </div>
26
+ <div class="underline">Documentation</div>
27
+ </a>
28
+ <a
29
+ href="https://github.com/UKPLab/sentence-transformers/blob/master/sentence_transformers/SentenceTransformer.py#L417"
30
+ class="block overflow-hidden group"
31
+ >
32
+ <div
33
+ class="w-full h-40 mb-2 bg-gray-900 group-hover:bg-gray-850 rounded-lg flex items-start justify-start overflow-hidden"
34
+ >
35
+ <img
36
+ alt=""
37
+ src="https://huggingface.co/spaces/sentence-transformers/README/resolve/main/push-to-hub.png"
38
+ class="w-full h-40 object-cover overflow-hidden"
39
+ />
40
+ </div>
41
+ <div class="underline">Push your Sentence Transformers models to the Hub ❤️ </div>
42
+ </a>
43
+ <a
44
+ href="https://huggingface.co/models?library=sentence-transformers&sort=downloads"
45
+ class="block overflow-hidden group"
46
+ >
47
+ <div
48
+ class="w-full h-40 mb-2 bg-gray-900 group-hover:bg-gray-850 rounded-lg flex items-start justify-start overflow-hidden"
49
+ >
50
+ <img
51
+ alt=""
52
+ src="https://huggingface.co/spaces/sentence-transformers/README/resolve/main/sbert-hf.png"
53
+ class="w-full h-40 object-cover overflow-hidden"
54
+ />
55
+ </div>
56
+ <div class="underline">Find all Sentence Transformers models on the 🤗 Hub</div>
57
+ </a>
58
+ <div class="lg:col-span-3">
59
+ <p class="mb-4">
60
+ To upload your Keras models to the Hub, you can use the <a
61
+ href="https://github.com/huggingface/huggingface_hub/blob/1f83ed230932128fba8bfe2a7f0c78df66e6e3ee/src/huggingface_hub/keras_mixin.py#L60"
62
+ >push_to_hub_keras</a
63
+ >
64
+ function.
65
+ </p>
66
+ <div
67
+ class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
68
+ >
69
+ <pre
70
+ class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
71
+ !pip install huggingface-hub
72
+ !huggingface-cli login
73
+ from huggingface_hub.keras_mixin import push_to_hub_keras
74
+ push_to_hub_keras(model = model, repo_url = "https://huggingface.co/your-username/your-awesome-model")
75
+ </pre>
76
+ </div>
77
+ </p>
78
+ <div class="lg:col-span-3">
79
+ <p class="mb-4">
80
+ To load Keras models from the 🤗Hub, use <a
81
+ href="https://github.com/huggingface/huggingface_hub/blob/d3ba39a69bb5570eb7f31ce76a19b53fdc89728b/src/huggingface_hub/keras_mixin.py#L56"
82
+ >from_pretrained_keras</a
83
+ >
84
+ function.
85
+ </p>
86
+ <div
87
+ class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
88
+ >
89
+ <pre
90
+ class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
91
+ !pip install huggingface-hub
92
+ !huggingface-cli login
93
+ from huggingface_hub.keras_mixin import from_pretrained_keras
94
+ from_pretrained_keras("your-username/your-awesome-model)
95
+ </pre>
96
+ </div>
97
+ <div class="lg:col-span-1">
98
+ <p class="mb-4">
99
+ If you'd like to upload 🤗Transformers based Keras checkpoints and let us host your metrics interactively in the repo in with TensorBoard, use <a
100
+ href="https://huggingface.co/transformers/v4.12.5/_modules/transformers/keras_callbacks.html#PushToHubCallback"
101
+ >PushToHubCallback</a
102
+ >
103
+ like follows:
104
+ </p>
105
+ <div
106
+ class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
107
+ >
108
+ <pre
109
+ class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
110
+ !pip install huggingface-hub
111
+ !huggingface-cli login
112
+ from transformers.keras_callbacks import PushToHubCallback
113
+ from tensorflow.keras.callbacks import TensorBoard
114
+ tensorboard_callback = TensorBoard(log_dir = "./logs/tensorboard)
115
+ push_to_hub_callback = PushToHubCallback(output_dir="./logs",
116
+ tokenizer=tokenizer,
117
+ hub_model_id=model_id)
118
 
119
+ callbacks = [tensorboard_callback, push_to_hub_callback]
120
+ model.fit(..., callbacks=callbacks, ...)
121
 
122
+ </pre>
 
123
 
124
+ </div>