Spaces:
Sleeping
Sleeping
Commit
•
7be8da7
1
Parent(s):
fb7f097
Updating to single text input
Browse files
app.py
CHANGED
@@ -8,11 +8,8 @@ model = SentenceTransformer("nomic-ai/nomic-embed-text-v1", trust_remote_code=Tr
|
|
8 |
|
9 |
|
10 |
@spaces.GPU
|
11 |
-
def embed(
|
12 |
-
|
13 |
-
for document in documents:
|
14 |
-
embeddings.append(model.encode(document))
|
15 |
-
return embeddings
|
16 |
|
17 |
|
18 |
with gr.Blocks() as app:
|
|
|
8 |
|
9 |
|
10 |
@spaces.GPU
|
11 |
+
def embed(document: str):
|
12 |
+
return model.encode(document)
|
|
|
|
|
|
|
13 |
|
14 |
|
15 |
with gr.Blocks() as app:
|