Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
import getpass
|
4 |
import os
|
5 |
|
6 |
os.environ["OPENAI_API_KEY"] = st.secrets['OPENAI_API_KEY'] # agregada en la config de hugginface
|
7 |
-
|
8 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
9 |
os.environ["LANGCHAIN_API_KEY"] = st.secrets['OPENAI_API_KEY']
|
10 |
|
@@ -14,6 +12,10 @@ from langchain.chains.llm import LLMChain
|
|
14 |
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
|
15 |
from langchain.chat_models import ChatOpenAI
|
16 |
from langchain.chains import RetrievalQA
|
|
|
|
|
|
|
|
|
17 |
|
18 |
|
19 |
#Carga de DATASET
|
|
|
1 |
import streamlit as st
|
|
|
2 |
import getpass
|
3 |
import os
|
4 |
|
5 |
os.environ["OPENAI_API_KEY"] = st.secrets['OPENAI_API_KEY'] # agregada en la config de hugginface
|
|
|
6 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
7 |
os.environ["LANGCHAIN_API_KEY"] = st.secrets['OPENAI_API_KEY']
|
8 |
|
|
|
12 |
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
|
13 |
from langchain.chat_models import ChatOpenAI
|
14 |
from langchain.chains import RetrievalQA
|
15 |
+
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
16 |
+
from langchain_community.vectorstores import FAISS
|
17 |
+
from langchain_community.document_loaders import HuggingFaceDatasetLoader
|
18 |
+
from langchain_community.embeddings import HuggingFaceEmbeddings
|
19 |
|
20 |
|
21 |
#Carga de DATASET
|