KushwanthK commited on
Commit
ac6a5dc
·
verified ·
1 Parent(s): 615c7af

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. requirements.txt +2 -2
app.py CHANGED
@@ -12,9 +12,9 @@ import base64
12
  # from tqdm.auto import tqdm
13
  import math
14
  # from transformers import pipeline
15
- import nltk
16
 
17
  from collections import Counter
 
18
  from nltk.corpus import stopwords
19
 
20
 
@@ -23,8 +23,8 @@ import torch
23
  from langchain_community.llms.ollama import Ollama
24
  from langchain.prompts import ChatPromptTemplate
25
  from langchain_community.vectorstores import FAISS
26
- from langchain.vectorstores import faiss
27
- from langchain.vectorstores import FAISS
28
 
29
  import time
30
  from time import sleep
@@ -204,6 +204,7 @@ def get_faiss_semantic_index():
204
  with stqdm(total=100, desc="Loading pickle file...") as progress_bar:
205
  with open(index_path, "rb") as f:
206
  faiss_index = pickle.load(f)
 
207
  progress_bar.update(100)
208
  st.write("Embeddings loaded successfully.")
209
  return faiss_index
 
12
  # from tqdm.auto import tqdm
13
  import math
14
  # from transformers import pipeline
 
15
 
16
  from collections import Counter
17
+ import nltk
18
  from nltk.corpus import stopwords
19
 
20
 
 
23
  from langchain_community.llms.ollama import Ollama
24
  from langchain.prompts import ChatPromptTemplate
25
  from langchain_community.vectorstores import FAISS
26
+ # from langchain.vectorstores import faiss
27
+ # from langchain.vectorstores import FAISS
28
 
29
  import time
30
  from time import sleep
 
204
  with stqdm(total=100, desc="Loading pickle file...") as progress_bar:
205
  with open(index_path, "rb") as f:
206
  faiss_index = pickle.load(f)
207
+ sleep(0.5)
208
  progress_bar.update(100)
209
  st.write("Embeddings loaded successfully.")
210
  return faiss_index
requirements.txt CHANGED
@@ -14,6 +14,6 @@ PyMuPDF # instead of fitz
14
  nltk
15
  langchain_community
16
  langchain
17
- faiss-gpu
18
- faiss-cpu
19
  stqdm
 
14
  nltk
15
  langchain_community
16
  langchain
17
+ # faiss-gpu
18
+ # faiss-cpu
19
  stqdm