Spaces:
Sleeping
Sleeping
Commit
·
6cd33a5
1
Parent(s):
9913f6f
debug
Browse files- Api/app/main.py +8 -0
- Api/app/qdrant.py +0 -1
Api/app/main.py
CHANGED
@@ -16,6 +16,13 @@ from app.modules.querySearch.routes.querySearch_route import \
|
|
16 |
router as query_search_routes
|
17 |
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
@asynccontextmanager
|
20 |
async def lifespan(app: FastAPI):
|
21 |
dense_model_name = "sentence-transformers/all-MiniLM-L6-v2"
|
@@ -29,6 +36,7 @@ async def lifespan(app: FastAPI):
|
|
29 |
sparse_model = AutoModelForMaskedLM.from_pretrained(sparse_model_name)
|
30 |
|
31 |
qa_pipeline = pipeline("question-answering", model=qa_model_name)
|
|
|
32 |
|
33 |
yield {
|
34 |
"dense_tokenizer": dense_tokenizer,
|
|
|
16 |
router as query_search_routes
|
17 |
|
18 |
|
19 |
+
from dotenv import load_dotenv
|
20 |
+
import os
|
21 |
+
from app.service.api import baseURL
|
22 |
+
|
23 |
+
load_dotenv()
|
24 |
+
api_key = os.getenv("QDRANT_API_KEY")
|
25 |
+
|
26 |
@asynccontextmanager
|
27 |
async def lifespan(app: FastAPI):
|
28 |
dense_model_name = "sentence-transformers/all-MiniLM-L6-v2"
|
|
|
36 |
sparse_model = AutoModelForMaskedLM.from_pretrained(sparse_model_name)
|
37 |
|
38 |
qa_pipeline = pipeline("question-answering", model=qa_model_name)
|
39 |
+
print(api_key)
|
40 |
|
41 |
yield {
|
42 |
"dense_tokenizer": dense_tokenizer,
|
Api/app/qdrant.py
CHANGED
@@ -8,7 +8,6 @@ from app.service.api import baseURL
|
|
8 |
load_dotenv()
|
9 |
|
10 |
api_key = os.getenv("QDRANT_API_KEY")
|
11 |
-
print(api_key)
|
12 |
|
13 |
class QdrantConnectionDb:
|
14 |
client = None
|
|
|
8 |
load_dotenv()
|
9 |
|
10 |
api_key = os.getenv("QDRANT_API_KEY")
|
|
|
11 |
|
12 |
class QdrantConnectionDb:
|
13 |
client = None
|