derek-thomas HF staff commited on
Commit
7be8da7
1 Parent(s): fb7f097

Updating to single text input

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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(documents: List[str]):
12
- embeddings = []
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: