Spaces:
Running
Running
Update rag.py
Browse files- Dockerfile +3 -3
- app/rag.py +3 -2
Dockerfile
CHANGED
@@ -6,9 +6,9 @@ COPY ./requirements.txt /code/requirements.txt
|
|
6 |
|
7 |
COPY ./app /code/app
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
14 |
|
|
|
6 |
|
7 |
COPY ./app /code/app
|
8 |
|
9 |
+
RUN python -m venv venv
|
10 |
+
|
11 |
+
RUN source venv/bin/activate
|
12 |
|
13 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
14 |
|
app/rag.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
import os
|
2 |
import logging
|
3 |
from llama_index.core import (
|
|
|
4 |
VectorStoreIndex,
|
5 |
StorageContext,
|
6 |
Settings,
|
7 |
get_response_synthesizer)
|
8 |
-
from llama_index.legacy.readers.file.base import SimpleDirectoryReader
|
9 |
from llama_index.core.node_parser import SentenceSplitter
|
10 |
from llama_index.core.schema import TextNode, MetadataMode
|
11 |
from llama_index.core.vector_stores import VectorStoreQuery
|
@@ -13,7 +14,7 @@ from llama_index.llms.llama_cpp import LlamaCPP
|
|
13 |
from llama_index.embeddings.fastembed import FastEmbedEmbedding
|
14 |
from llama_index.vector_stores.qdrant import QdrantVectorStore
|
15 |
from qdrant_client import QdrantClient
|
16 |
-
|
17 |
|
18 |
|
19 |
QDRANT_API_URL = os.getenv('QDRANT_API_URL')
|
|
|
1 |
import os
|
2 |
import logging
|
3 |
from llama_index.core import (
|
4 |
+
SimpleDirectoryReader,
|
5 |
VectorStoreIndex,
|
6 |
StorageContext,
|
7 |
Settings,
|
8 |
get_response_synthesizer)
|
9 |
+
# from llama_index.legacy.readers.file.base import SimpleDirectoryReader
|
10 |
from llama_index.core.node_parser import SentenceSplitter
|
11 |
from llama_index.core.schema import TextNode, MetadataMode
|
12 |
from llama_index.core.vector_stores import VectorStoreQuery
|
|
|
14 |
from llama_index.embeddings.fastembed import FastEmbedEmbedding
|
15 |
from llama_index.vector_stores.qdrant import QdrantVectorStore
|
16 |
from qdrant_client import QdrantClient
|
17 |
+
from llama_index.readers.file.docs.base import DocxReader, HWPReader, PDFReader
|
18 |
|
19 |
|
20 |
QDRANT_API_URL = os.getenv('QDRANT_API_URL')
|