espejelomar
commited on
Commit
·
c32663c
1
Parent(s):
0b1ab93
Update README.md
Browse files
README.md
CHANGED
@@ -1,10 +1,113 @@
|
|
1 |
---
|
2 |
title: README
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
-
sdk:
|
7 |
pinned: false
|
8 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: README
|
3 |
+
emoji: ❤️
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: red
|
6 |
+
sdk: static
|
7 |
pinned: false
|
8 |
---
|
9 |
+
<div class="lg:col-span-3">
|
10 |
+
<p class="mb-4">
|
11 |
+
SentenceTransformers 🤗 is a Python framework for state-of-the-art sentence, text and image embeddings.
|
12 |
+
</p>
|
13 |
+
<p class="mb-4">
|
14 |
+
Install the <a
|
15 |
+
href="https://www.sbert.net/"
|
16 |
+
>Sentence Transformers</a
|
17 |
+
>
|
18 |
+
library.
|
19 |
+
</p>
|
20 |
+
<div
|
21 |
+
class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
|
22 |
+
>
|
23 |
+
<pre class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
24 |
+
pip install -U sentence-transformers
|
25 |
+
</pre>
|
26 |
+
</div>
|
27 |
+
</p>
|
28 |
+
<div class="lg:col-span-3">
|
29 |
+
<p class="mb-4">
|
30 |
+
The usage is as simple as:
|
31 |
+
</p>
|
32 |
+
<div
|
33 |
+
class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
|
34 |
+
>
|
35 |
+
<pre class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
36 |
+
from sentence_transformers import SentenceTransformer
|
37 |
+
model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
|
38 |
|
39 |
+
#Sentences we want to encode. Example:
|
40 |
+
sentence = ['This framework generates embeddings for each input sentence']
|
41 |
+
|
42 |
+
#Sentences are encoded by calling model.encode()
|
43 |
+
embedding = model.encode(sentence)
|
44 |
+
</pre>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<div class="grid lg:grid-cols-3 gap-x-4 gap-y-7">
|
49 |
+
<div class="lg:col-span-3">
|
50 |
+
<p class="mb-4">
|
51 |
+
Hugging Face makes it easy to collaboratively build and showcase your <a
|
52 |
+
href="https://www.sbert.net/">Sentence Transformers</a
|
53 |
+
>
|
54 |
+
models! You can collaborate with your organization, upload and showcase your own models in your profile ❤️
|
55 |
+
</p>
|
56 |
+
</div>
|
57 |
+
<a href="https://www.sbert.net/" class="block overflow-hidden group">
|
58 |
+
<div
|
59 |
+
class="w-full h-40 object-cover mb-2 rounded-lg flex items-center justify-center bg-[#FA8072]"
|
60 |
+
>
|
61 |
+
<img alt="" src="https://huggingface.co/spaces/sentence-transformers/README/resolve/main/sbertLogo.png" class="w-40" />
|
62 |
+
</div>
|
63 |
+
<div class="underline">Documentation</div>
|
64 |
+
</a>
|
65 |
+
<a
|
66 |
+
href="https://github.com/UKPLab/sentence-transformers/blob/master/sentence_transformers/SentenceTransformer.py#L417"
|
67 |
+
class="block overflow-hidden group"
|
68 |
+
>
|
69 |
+
<div
|
70 |
+
class="w-full h-40 mb-2 bg-gray-900 group-hover:bg-gray-850 rounded-lg flex items-start justify-start overflow-hidden"
|
71 |
+
>
|
72 |
+
<img
|
73 |
+
alt=""
|
74 |
+
src="https://huggingface.co/spaces/sentence-transformers/README/resolve/main/push-to-hub.png"
|
75 |
+
class="w-full h-40 object-cover overflow-hidden"
|
76 |
+
/>
|
77 |
+
</div>
|
78 |
+
<div class="underline">Push your Sentence Transformers models to the Hub ❤️ </div>
|
79 |
+
</a>
|
80 |
+
<a
|
81 |
+
href="https://huggingface.co/models?library=sentence-transformers&sort=downloads"
|
82 |
+
class="block overflow-hidden group"
|
83 |
+
>
|
84 |
+
<div
|
85 |
+
class="w-full h-40 mb-2 bg-gray-900 group-hover:bg-gray-850 rounded-lg flex items-start justify-start overflow-hidden"
|
86 |
+
>
|
87 |
+
<img
|
88 |
+
alt=""
|
89 |
+
src="https://huggingface.co/spaces/sentence-transformers/README/resolve/main/sbert-hf.png"
|
90 |
+
class="w-full h-40 object-cover overflow-hidden"
|
91 |
+
/>
|
92 |
+
</div>
|
93 |
+
<div class="underline">Find all Sentence Transformers models on the 🤗 Hub</div>
|
94 |
+
</a>
|
95 |
+
<div class="lg:col-span-3">
|
96 |
+
<p class="mb-4">
|
97 |
+
To upload your Sentence Transformers models to the Hugging Face Hub log in with <code class="language-python">huggingface-cli login</code> and then use the <a
|
98 |
+
href="https://github.com/UKPLab/sentence-transformers/blob/master/sentence_transformers/SentenceTransformer.py#L417"
|
99 |
+
>save_to_hub</a
|
100 |
+
>
|
101 |
+
function within the Sentence Transformers library.
|
102 |
+
</p>
|
103 |
+
<div
|
104 |
+
class="p-4 bg-gradient-to-b from-gray-50-to-white border border-gray-100 rounded-lg relative mb-4"
|
105 |
+
>
|
106 |
+
<pre
|
107 |
+
class="break-words leading-1 whitespace-pre-line text-xs md:text-sm text-gray-800">
|
108 |
+
from sentence_transformers import save_to_hub
|
109 |
+
save_to_hub(repo_name = 'cool_new_model')
|
110 |
+
</pre>
|
111 |
+
</div>
|
112 |
+
</p>
|
113 |
+
</div>
|