Spaces:
Running
Running
Oviya
commited on
Commit
·
2bab34a
1
Parent(s):
0cf71c1
fix
Browse files- .env +1 -1
- ragg/rag_backend.py +4 -1
- requirements.txt +5 -3
.env
CHANGED
|
@@ -8,7 +8,7 @@ DID_SOURCE_IMAGE_URL=https://i.ibb.co/Tpq77ZJ/teacher.png
|
|
| 8 |
DID_VOICE_ID=en-US-JennyNeural
|
| 9 |
TESSERACT_CMD=C:\Program Files\Tesseract-OCR\tesseract.exe
|
| 10 |
CHROMA_DIR=C:\path\to\your\project\chroma
|
| 11 |
-
CHROMA_ROOT=
|
| 12 |
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
| 13 |
ALLOWED_ORIGINS=http://localhost:4200,http://127.0.0.1:4200
|
| 14 |
RAG_INGEST_URL=http://localhost:5000/rag/ingest
|
|
|
|
| 8 |
DID_VOICE_ID=en-US-JennyNeural
|
| 9 |
TESSERACT_CMD=C:\Program Files\Tesseract-OCR\tesseract.exe
|
| 10 |
CHROMA_DIR=C:\path\to\your\project\chroma
|
| 11 |
+
CHROMA_ROOT=C:/Users/DELL/Desktop/Deploymnet/29 oct/py-learn-backend/ragg/chroma
|
| 12 |
EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
| 13 |
ALLOWED_ORIGINS=http://localhost:4200,http://127.0.0.1:4200
|
| 14 |
RAG_INGEST_URL=http://localhost:5000/rag/ingest
|
ragg/rag_backend.py
CHANGED
|
@@ -19,7 +19,10 @@ except Exception:
|
|
| 19 |
|
| 20 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 21 |
from langchain_community.vectorstores import Chroma
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
from pdf2image import convert_from_path
|
| 24 |
from PIL import Image # noqa: F401 (used implicitly via pdf2image)
|
| 25 |
import pytesseract
|
|
|
|
| 19 |
|
| 20 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
| 21 |
from langchain_community.vectorstores import Chroma
|
| 22 |
+
try:
|
| 23 |
+
from langchain_core.documents import Document # LC >= 0.2
|
| 24 |
+
except Exception:
|
| 25 |
+
from langchain.schema import Document
|
| 26 |
from pdf2image import convert_from_path
|
| 27 |
from PIL import Image # noqa: F401 (used implicitly via pdf2image)
|
| 28 |
import pytesseract
|
requirements.txt
CHANGED
|
@@ -15,10 +15,12 @@ boto3==1.35.13
|
|
| 15 |
ffmpeg-python==0.2.0
|
| 16 |
imageio-ffmpeg
|
| 17 |
pydantic>=2
|
| 18 |
-
chromadb
|
| 19 |
langchain>=0.3
|
| 20 |
-
langchain-
|
| 21 |
-
langchain-
|
|
|
|
|
|
|
| 22 |
pypdf>=4
|
| 23 |
tiktoken
|
| 24 |
|
|
|
|
| 15 |
ffmpeg-python==0.2.0
|
| 16 |
imageio-ffmpeg
|
| 17 |
pydantic>=2
|
| 18 |
+
chromadb==0.5.4
|
| 19 |
langchain>=0.3
|
| 20 |
+
langchain-core==0.2.38
|
| 21 |
+
langchain-community==0.2.11
|
| 22 |
+
langchain-text-splitters==0.2.2
|
| 23 |
+
sentence-transformers==2.2.2
|
| 24 |
pypdf>=4
|
| 25 |
tiktoken
|
| 26 |
|