Spaces:
Running
Running
github-actions[bot] commited on
Commit ·
cb5ebf4
1
Parent(s): c1b316f
Deploy from GitHub Actions: a38441ef80ec744c5b4e64d3233112b4c775f7e5
Browse files- app/config.py +3 -3
- app/rag/pipeline.py +8 -8
app/config.py
CHANGED
|
@@ -31,14 +31,14 @@ UPLOAD_DIR = "data/uploads"
|
|
| 31 |
|
| 32 |
ALLOWED_TYPES = {
|
| 33 |
"pdf",
|
| 34 |
-
"docx",
|
| 35 |
-
"xlsx",
|
| 36 |
"csv",
|
| 37 |
-
"pptx",
|
| 38 |
"txt",
|
| 39 |
"md",
|
| 40 |
"json",
|
| 41 |
"tex",
|
|
|
|
|
|
|
|
|
|
| 42 |
}
|
| 43 |
|
| 44 |
PROMPT = (
|
|
|
|
| 31 |
|
| 32 |
ALLOWED_TYPES = {
|
| 33 |
"pdf",
|
|
|
|
|
|
|
| 34 |
"csv",
|
|
|
|
| 35 |
"txt",
|
| 36 |
"md",
|
| 37 |
"json",
|
| 38 |
"tex",
|
| 39 |
+
"docx",
|
| 40 |
+
"xlsx",
|
| 41 |
+
"pptx",
|
| 42 |
}
|
| 43 |
|
| 44 |
PROMPT = (
|
app/rag/pipeline.py
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
from app.rag.chunker import chunk_docs
|
| 2 |
from app.rag.cleaner import clean_text, process_latex
|
| 3 |
from app.rag.loader import (
|
| 4 |
-
read_csv,
|
| 5 |
-
read_docx,
|
| 6 |
-
read_json,
|
| 7 |
-
read_md,
|
| 8 |
read_pdf,
|
| 9 |
-
|
| 10 |
read_txt,
|
| 11 |
-
|
|
|
|
| 12 |
read_tex,
|
|
|
|
|
|
|
|
|
|
| 13 |
)
|
| 14 |
from app.rag.vectorstore import add_documents
|
| 15 |
from langchain_core.documents import Document
|
|
@@ -18,14 +18,14 @@ from langchain_google_genai import ChatGoogleGenerativeAI
|
|
| 18 |
|
| 19 |
LOADERS = {
|
| 20 |
"pdf": read_pdf,
|
| 21 |
-
"txt": read_txt,
|
| 22 |
"csv": read_csv,
|
|
|
|
| 23 |
"md": read_md,
|
| 24 |
"json": read_json,
|
|
|
|
| 25 |
"docx": read_docx,
|
| 26 |
"xlsx": read_xlsx,
|
| 27 |
"pptx": read_pptx,
|
| 28 |
-
"tex": read_tex,
|
| 29 |
}
|
| 30 |
|
| 31 |
llm = ChatGoogleGenerativeAI(model=CHAT_MODEL, google_api_key=GOOGLE_API_KEY)
|
|
|
|
| 1 |
from app.rag.chunker import chunk_docs
|
| 2 |
from app.rag.cleaner import clean_text, process_latex
|
| 3 |
from app.rag.loader import (
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
read_pdf,
|
| 5 |
+
read_csv,
|
| 6 |
read_txt,
|
| 7 |
+
read_md,
|
| 8 |
+
read_json,
|
| 9 |
read_tex,
|
| 10 |
+
read_docx,
|
| 11 |
+
read_xlsx,
|
| 12 |
+
read_pptx,
|
| 13 |
)
|
| 14 |
from app.rag.vectorstore import add_documents
|
| 15 |
from langchain_core.documents import Document
|
|
|
|
| 18 |
|
| 19 |
LOADERS = {
|
| 20 |
"pdf": read_pdf,
|
|
|
|
| 21 |
"csv": read_csv,
|
| 22 |
+
"txt": read_txt,
|
| 23 |
"md": read_md,
|
| 24 |
"json": read_json,
|
| 25 |
+
"tex": read_tex,
|
| 26 |
"docx": read_docx,
|
| 27 |
"xlsx": read_xlsx,
|
| 28 |
"pptx": read_pptx,
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
llm = ChatGoogleGenerativeAI(model=CHAT_MODEL, google_api_key=GOOGLE_API_KEY)
|