Ilyas KHIAT
commited on
Commit
·
cee0ff2
1
Parent(s):
5753550
model choice conseil IA
Browse files- .gitignore +2 -1
- chat_te.py +4 -3
.gitignore
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
__pycache__/
|
| 2 |
.streamlit/secrets.toml
|
| 3 |
-
.streamlit/.env
|
|
|
|
|
|
| 1 |
__pycache__/
|
| 2 |
.streamlit/secrets.toml
|
| 3 |
+
.streamlit/.env
|
| 4 |
+
DATA_bziiit/vectorstore_op
|
chat_te.py
CHANGED
|
@@ -44,9 +44,10 @@ def get_conversation_chain(vectorstore):
|
|
| 44 |
return rag_chain
|
| 45 |
|
| 46 |
def create_db(file):
|
| 47 |
-
docs = get_docs_from_pdf(file)
|
| 48 |
-
doc_chunks = get_doc_chunks(docs)
|
| 49 |
-
vectorstore = get_vectorstore_from_docs(doc_chunks)
|
|
|
|
| 50 |
return vectorstore
|
| 51 |
|
| 52 |
def get_response(chain,user_query, chat_history):
|
|
|
|
| 44 |
return rag_chain
|
| 45 |
|
| 46 |
def create_db(file):
|
| 47 |
+
# docs = get_docs_from_pdf(file)
|
| 48 |
+
# doc_chunks = get_doc_chunks(docs)
|
| 49 |
+
# vectorstore = get_vectorstore_from_docs(doc_chunks)
|
| 50 |
+
vectorstore = FAISS.load_local("index", OpenAIEmbeddings())
|
| 51 |
return vectorstore
|
| 52 |
|
| 53 |
def get_response(chain,user_query, chat_history):
|