Spaces:
Sleeping
Sleeping
Commit
•
8a81ae8
1
Parent(s):
a9f0b60
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,11 @@
|
|
1 |
from typing import List
|
2 |
|
3 |
import gradio as gr
|
4 |
-
import spaces
|
5 |
from sentence_transformers import SentenceTransformer
|
6 |
|
7 |
-
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True, device='
|
8 |
|
9 |
|
10 |
-
@spaces.GPU
|
11 |
def embed(document: str):
|
12 |
return model.encode(document)
|
13 |
|
|
|
1 |
from typing import List
|
2 |
|
3 |
import gradio as gr
|
|
|
4 |
from sentence_transformers import SentenceTransformer
|
5 |
|
6 |
+
model = SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True, device='cpu')
|
7 |
|
8 |
|
|
|
9 |
def embed(document: str):
|
10 |
return model.encode(document)
|
11 |
|