Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,14 +21,14 @@ embedding_function = HuggingFaceBgeEmbeddings(
|
|
21 |
)
|
22 |
|
23 |
# Set the OpenAI API key
|
24 |
-
openai.api_key = os.getenv("
|
25 |
|
26 |
# Load the FAISS index using LangChain's FAISS implementation
|
27 |
db = FAISS.load_local("Faiss", embedding_function, allow_dangerous_deserialization=True)
|
28 |
parser = StrOutputParser()
|
29 |
|
30 |
# Load your data (e.g., a DataFrame)
|
31 |
-
df = pd.read_pickle('df_news.pkl')
|
32 |
|
33 |
# Search function to retrieve relevant documents
|
34 |
def search(query):
|
|
|
21 |
)
|
22 |
|
23 |
# Set the OpenAI API key
|
24 |
+
openai.api_key = os.getenv("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")
|
25 |
|
26 |
# Load the FAISS index using LangChain's FAISS implementation
|
27 |
db = FAISS.load_local("Faiss", embedding_function, allow_dangerous_deserialization=True)
|
28 |
parser = StrOutputParser()
|
29 |
|
30 |
# Load your data (e.g., a DataFrame)
|
31 |
+
df = pd.read_pickle('df_news (1).pkl')
|
32 |
|
33 |
# Search function to retrieve relevant documents
|
34 |
def search(query):
|