Spaces:
Sleeping
Sleeping
Commit
·
244e6ad
1
Parent(s):
614ffab
Using Ingest
Browse files- .gitignore +2 -1
- Dockerfile +3 -15
- __pycache__/app.cpython-311.pyc +0 -0
- app.py +1 -1
- docker-compose.yml +0 -12
.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
Data
|
|
|
|
1 |
+
Data
|
2 |
+
.env
|
Dockerfile
CHANGED
@@ -1,10 +1,4 @@
|
|
1 |
-
|
2 |
-
FROM kushagrash13/qdrant_with_patent_database:latest
|
3 |
-
|
4 |
-
# Install system dependencies
|
5 |
-
RUN apt-get update && \
|
6 |
-
apt-get install -y wget tar python3-pip python3-venv && \
|
7 |
-
rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
# Set working directory
|
10 |
WORKDIR /code
|
@@ -12,13 +6,7 @@ WORKDIR /code
|
|
12 |
# Copy requirements file
|
13 |
COPY ./requirements.txt /code/requirements.txt
|
14 |
|
15 |
-
|
16 |
-
RUN python3 -m venv /venv
|
17 |
-
ENV PATH="/venv/bin:$PATH"
|
18 |
-
RUN /venv/bin/pip install --no-cache-dir --upgrade pip
|
19 |
-
|
20 |
-
# Install Python dependencies from requirements file
|
21 |
-
RUN /venv/bin/pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
22 |
|
23 |
# Add a user and set environment variables
|
24 |
RUN useradd -m -u 1000 user
|
@@ -33,4 +21,4 @@ WORKDIR $HOME/app
|
|
33 |
COPY --chown=user . $HOME/app
|
34 |
|
35 |
# Start Qdrant and the application
|
36 |
-
CMD ["
|
|
|
1 |
+
FROM python:3.11
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
# Set working directory
|
4 |
WORKDIR /code
|
|
|
6 |
# Copy requirements file
|
7 |
COPY ./requirements.txt /code/requirements.txt
|
8 |
|
9 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
# Add a user and set environment variables
|
12 |
RUN useradd -m -u 1000 user
|
|
|
21 |
COPY --chown=user . $HOME/app
|
22 |
|
23 |
# Start Qdrant and the application
|
24 |
+
CMD ["python3 ingest.py", "sleep 5", "uvicorn app:app --host 0.0.0.0 --port 7860"]
|
__pycache__/app.cpython-311.pyc
CHANGED
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -79,4 +79,4 @@ async def get_response(query: str = Form(...)):
|
|
79 |
response_data = jsonable_encoder(json.dumps({"answer": answer, "source_document": source_document, "doc": doc}))
|
80 |
|
81 |
res = Response(response_data)
|
82 |
-
return res
|
|
|
79 |
response_data = jsonable_encoder(json.dumps({"answer": answer, "source_document": source_document, "doc": doc}))
|
80 |
|
81 |
res = Response(response_data)
|
82 |
+
return res
|
docker-compose.yml
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
version: '3.8'
|
2 |
-
|
3 |
-
services:
|
4 |
-
qdrant:
|
5 |
-
image: <your_dockerhub_username>/qdrant_with_patent_database:latest
|
6 |
-
ports:
|
7 |
-
- "6333:6333"
|
8 |
-
volumes:
|
9 |
-
- qdrant_data:/qdrant/data
|
10 |
-
|
11 |
-
volumes:
|
12 |
-
qdrant_data:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|