Commit ·
3a417f7
1
Parent(s): 22865a0
Sentence
Browse files- Sentence.py +6 -0
Sentence.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model_id = "sentence-transformers/all-MiniLM-L6-v2"
|
| 2 |
+
hf_token = "get your token in http://hf.co/settings/tokens"
|
| 3 |
+
import requests
|
| 4 |
+
|
| 5 |
+
api_url = f"https://api-inference.huggingface.co/pipeline/feature-extraction/{model_id}"
|
| 6 |
+
headers = {"Authorization": f"Bearer {hf_token}"}
|