Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,7 +38,7 @@ embedding_model = SentenceTransformerEmbedding('all-MiniLM-L6-v2')
|
|
| 38 |
groq_api_key = "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"
|
| 39 |
langchain_api_key = "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"
|
| 40 |
|
| 41 |
-
llm = ChatGroq(model="llama3-8b-8192")
|
| 42 |
|
| 43 |
def load_document(document_path):
|
| 44 |
try:
|
|
@@ -64,7 +64,7 @@ def initialize_chroma(splits):
|
|
| 64 |
rag_chain = (
|
| 65 |
{"context": retriever | format_docs, "question": RunnablePassthrough()}
|
| 66 |
| prompt
|
| 67 |
-
| llm
|
| 68 |
| StrOutputParser()
|
| 69 |
)
|
| 70 |
return rag_chain
|
|
|
|
| 38 |
groq_api_key = "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"
|
| 39 |
langchain_api_key = "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"
|
| 40 |
|
| 41 |
+
llm = = ChatGroq(model="llama3-8b-8192", groq_api_key=groq_api_key)
|
| 42 |
|
| 43 |
def load_document(document_path):
|
| 44 |
try:
|
|
|
|
| 64 |
rag_chain = (
|
| 65 |
{"context": retriever | format_docs, "question": RunnablePassthrough()}
|
| 66 |
| prompt
|
| 67 |
+
| llm
|
| 68 |
| StrOutputParser()
|
| 69 |
)
|
| 70 |
return rag_chain
|