Spaces:
Running
Running
Commit
·
a960c43
1
Parent(s):
f02b763
remove qudra database instance
Browse files- Dockerfile +2 -2
- qudrant_api +1 -0
- rag/repository.py +5 -2
Dockerfile
CHANGED
@@ -16,8 +16,8 @@ COPY --chown=user * ./
|
|
16 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
17 |
|
18 |
COPY --chown=user . /app
|
19 |
-
|
20 |
-
CMD ["sh", "-c", "qdrant & uvicorn main:app --host 0.0.0.0 --port 7860"]
|
21 |
|
22 |
|
23 |
|
|
|
16 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
17 |
|
18 |
COPY --chown=user . /app
|
19 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
20 |
+
# CMD ["sh", "-c", "qdrant & uvicorn main:app --host 0.0.0.0 --port 7860"]
|
21 |
|
22 |
|
23 |
|
qudrant_api
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3MiOiJtIn0.Q6rLdYDzVyr10B4AdYJHcPp9pCqWG7yhQ-NNmfWZqg8
|
rag/repository.py
CHANGED
@@ -5,8 +5,11 @@ from qdrant_client.http.models import ScoredPoint
|
|
5 |
|
6 |
class VectorRepository:
|
7 |
def __init__(self, host: str = "https://ahmed-eisa-qdrant-db.hf.space", port: int = 6333) -> None:
|
8 |
-
self.db_client = AsyncQdrantClient(host=host, port=port)
|
9 |
-
|
|
|
|
|
|
|
10 |
async def create_collection(self, collection_name: str, size: int) -> bool:
|
11 |
vectors_config = models.VectorParams(
|
12 |
size=size, distance=models.Distance.COSINE
|
|
|
5 |
|
6 |
class VectorRepository:
|
7 |
def __init__(self, host: str = "https://ahmed-eisa-qdrant-db.hf.space", port: int = 6333) -> None:
|
8 |
+
# self.db_client = AsyncQdrantClient(host=host, port=port)
|
9 |
+
self.db_client = AsyncQdrantClient(
|
10 |
+
url="https://e8342d34-1b50-48e3-95e2-d4eacd0755eb.us-east4-0.gcp.cloud.qdrant.io:6333",
|
11 |
+
api_key="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3MiOiJtIn0.Q6rLdYDzVyr10B4AdYJHcPp9pCqWG7yhQ-NNmfWZqg8",
|
12 |
+
)
|
13 |
async def create_collection(self, collection_name: str, size: int) -> bool:
|
14 |
vectors_config = models.VectorParams(
|
15 |
size=size, distance=models.Distance.COSINE
|