Spaces:
Sleeping
Sleeping
sickcell69
commited on
Commit
•
e037f51
1
Parent(s):
09711da
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ data = pd.read_json(data_path)
|
|
20 |
|
21 |
# 載入嵌入文件
|
22 |
embeddings_path = 'corpus_embeddings.pt'
|
23 |
-
corpus_embeddings = torch.load(embeddings_path, map_location=torch.device('cpu'))
|
24 |
|
25 |
def semantic_search(query):
|
26 |
query_embedding = model.encode(query, convert_to_tensor=True)
|
|
|
20 |
|
21 |
# 載入嵌入文件
|
22 |
embeddings_path = 'corpus_embeddings.pt'
|
23 |
+
corpus_embeddings = torch.load(embeddings_path, map_location=torch.device('cpu'))
|
24 |
|
25 |
def semantic_search(query):
|
26 |
query_embedding = model.encode(query, convert_to_tensor=True)
|