Update app.py
Browse files
app.py
CHANGED
|
@@ -587,19 +587,15 @@ def main():
|
|
| 587 |
base_docs = [Document(page_content="This is a placeholder document for RAG initialization.")]
|
| 588 |
|
| 589 |
vectorstore = create_vectorstore_from_text(base_docs, HuggingFaceEmbeddings(
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
| 594 |
st.session_state.rag_chain = create_rag_chain(
|
| 595 |
ChatGroq(api_key=os.getenv("GROQ_API_KEY", "your-groq-api-key"), model_name="llama3-8b-8192", temperature=0.1),
|
| 596 |
vectorstore
|
| 597 |
)
|
| 598 |
-
|
| 599 |
-
|
| 600 |
app = GEOSEOApp()
|
| 601 |
app.run()
|
| 602 |
-
|
| 603 |
-
|
| 604 |
if __name__ == "__main__":
|
| 605 |
main()
|
|
|
|
| 587 |
base_docs = [Document(page_content="This is a placeholder document for RAG initialization.")]
|
| 588 |
|
| 589 |
vectorstore = create_vectorstore_from_text(base_docs, HuggingFaceEmbeddings(
|
| 590 |
+
model_name="sentence-transformers/all-MiniLM-L6-v2",
|
| 591 |
+
model_kwargs={"device": "cpu"},
|
| 592 |
+
cache_folder="./hf_cache",
|
| 593 |
+
))
|
| 594 |
st.session_state.rag_chain = create_rag_chain(
|
| 595 |
ChatGroq(api_key=os.getenv("GROQ_API_KEY", "your-groq-api-key"), model_name="llama3-8b-8192", temperature=0.1),
|
| 596 |
vectorstore
|
| 597 |
)
|
|
|
|
|
|
|
| 598 |
app = GEOSEOApp()
|
| 599 |
app.run()
|
|
|
|
|
|
|
| 600 |
if __name__ == "__main__":
|
| 601 |
main()
|