Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- app.py +7 -1
- python_chunk.Rmd +15 -0
app.py
CHANGED
@@ -1 +1,7 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## from sentence_transformers import SentenceTransformer
|
2 |
+
##
|
3 |
+
## sentences = ["This is an example sentence", "Each sentence is converted"]
|
4 |
+
##
|
5 |
+
## model = SentenceTransformer('sentence-transformers/all-miniLM-L6-v2')
|
6 |
+
## embeddings = model.encode(sentences)
|
7 |
+
## print(embeddings)
|
python_chunk.Rmd
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: "Untitled"
|
3 |
+
output: html_document
|
4 |
+
date: "2024-04-04"
|
5 |
+
---
|
6 |
+
|
7 |
+
```{python}
|
8 |
+
from sentence_transformers import SentenceTransformer
|
9 |
+
|
10 |
+
sentences = ["This is an example sentence", "Each sentence is converted"]
|
11 |
+
|
12 |
+
model = SentenceTransformer('sentence-transformers/all-miniLM-L6-v2')
|
13 |
+
embeddings = model.encode(sentences)
|
14 |
+
print(embeddings)
|
15 |
+
```
|