Spaces:
Runtime error
Runtime error
EgorShibaev
commited on
Commit
·
c948381
1
Parent(s):
938f24e
bd
Browse files
backend/semantic_search.py
CHANGED
@@ -5,8 +5,10 @@ from sentence_transformers import SentenceTransformer
|
|
5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
6 |
import torch
|
7 |
import time
|
|
|
|
|
8 |
|
9 |
-
db = lancedb.connect(".lancedb")
|
10 |
|
11 |
TABLE = db.open_table(os.getenv("TABLE_NAME"))
|
12 |
VECTOR_COLUMN = os.getenv("VECTOR_COLUMN", "vector")
|
|
|
5 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
6 |
import torch
|
7 |
import time
|
8 |
+
import os
|
9 |
+
from pathlib import Path
|
10 |
|
11 |
+
db = lancedb.connect(Path(__file__).parent / ".lancedb")
|
12 |
|
13 |
TABLE = db.open_table(os.getenv("TABLE_NAME"))
|
14 |
VECTOR_COLUMN = os.getenv("VECTOR_COLUMN", "vector")
|