jybae commited on
Commit
72e216c
1 Parent(s): b23b172

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -21,11 +21,10 @@ if not openai_api_key:
21
  raise ValueError("OPENAI_API_KEY environment variable is not set.")
22
 
23
  embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
24
- with open("index.pkl", "rb") as f:
25
- db = faiss.read_index(f.read())
26
  #with open("index.pkl", "rb") as f:
27
- # db = faiss.deserialize_index(f.read())
28
- db = faiss.read_index(index_data)
 
29
 
30
  def get_response_from_query(db, query, k=3):
31
 
 
21
  raise ValueError("OPENAI_API_KEY environment variable is not set.")
22
 
23
  embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
 
 
24
  #with open("index.pkl", "rb") as f:
25
+ # db = faiss.read_index(f.read())
26
+ with open("index.pkl", "rb") as f:
27
+ db = faiss.deserialize_index(f.read())
28
 
29
  def get_response_from_query(db, query, k=3):
30