Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,9 +23,9 @@ class PDFQAProcessor:
|
|
23 |
|
24 |
llm = ChatGroq(
|
25 |
# model_name="deepseek-r1-distill-llama-70b",
|
26 |
-
model_name="
|
27 |
temperature=0.1,
|
28 |
-
max_tokens=
|
29 |
api_key = os.getenv('GROQ_API_KEY')
|
30 |
)
|
31 |
|
@@ -46,8 +46,8 @@ class PDFQAProcessor:
|
|
46 |
# )
|
47 |
|
48 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
49 |
-
CHUNK_SIZE =
|
50 |
-
CHUNK_OVERLAP =
|
51 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE,chunk_overlap = CHUNK_OVERLAP)
|
52 |
# persist_directory="./chroma_db"
|
53 |
|
@@ -81,7 +81,7 @@ class PDFQAProcessor:
|
|
81 |
splits,
|
82 |
self.embeddings
|
83 |
)
|
84 |
-
self.retriever = self.vectorstore.as_retriever(search_kwargs={"k":
|
85 |
return "PDFs processed successfully! Ask your questions now."
|
86 |
|
87 |
except Exception as e:
|
|
|
23 |
|
24 |
llm = ChatGroq(
|
25 |
# model_name="deepseek-r1-distill-llama-70b",
|
26 |
+
model_name="llama-3.3-70b-versatile",
|
27 |
temperature=0.1,
|
28 |
+
max_tokens=8000,
|
29 |
api_key = os.getenv('GROQ_API_KEY')
|
30 |
)
|
31 |
|
|
|
46 |
# )
|
47 |
|
48 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
49 |
+
CHUNK_SIZE = 550
|
50 |
+
CHUNK_OVERLAP = 80
|
51 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=CHUNK_SIZE,chunk_overlap = CHUNK_OVERLAP)
|
52 |
# persist_directory="./chroma_db"
|
53 |
|
|
|
81 |
splits,
|
82 |
self.embeddings
|
83 |
)
|
84 |
+
self.retriever = self.vectorstore.as_retriever(search_kwargs={"k": 18})
|
85 |
return "PDFs processed successfully! Ask your questions now."
|
86 |
|
87 |
except Exception as e:
|