supertskone commited on
Commit
a1bf242
·
unverified ·
1 Parent(s): e233b8e

Code cleanup

Browse files
Files changed (3) hide show
  1. app/vectorizer.py +1 -2
  2. requirements.txt +2 -2
  3. ui/app.py +0 -2
app/vectorizer.py CHANGED
@@ -32,11 +32,10 @@ class Vectorizer:
32
  # Check if the Pinecone index exists, if not create it
33
  existing_indexes = pinecone.list_indexes()
34
 
35
- logger.info(f"self.init_pineconeself.init_pineconeself"
36
- f".init_pineconeself.init_pineconeself.init_pinecone: {self._init_pinecone}")
37
  if self.pinecone_index_name not in existing_indexes:
38
  logger.info(f"Creating Pinecone index: {self.pinecone_index_name}")
39
  if self._init_pinecone:
 
40
  pinecone.create_index(
41
  name=self.pinecone_index_name,
42
  dimension=768,
 
32
  # Check if the Pinecone index exists, if not create it
33
  existing_indexes = pinecone.list_indexes()
34
 
 
 
35
  if self.pinecone_index_name not in existing_indexes:
36
  logger.info(f"Creating Pinecone index: {self.pinecone_index_name}")
37
  if self._init_pinecone:
38
+ # pinecone.delete_index(self.pinecone_index_name)
39
  pinecone.create_index(
40
  name=self.pinecone_index_name,
41
  dimension=768,
requirements.txt CHANGED
@@ -2,7 +2,7 @@ flask
2
  requests
3
  streamlit
4
  transformers
5
- numpy
6
  sentence-transformers
7
  datasets
8
- pinecone
 
2
  requests
3
  streamlit
4
  transformers
5
+ numpy==2.0.0
6
  sentence-transformers
7
  datasets
8
+ pinecone-client
ui/app.py CHANGED
@@ -21,8 +21,6 @@ if st.button("Search"):
21
 
22
  try:
23
  results = response.json()
24
- # for score, prompt in results:
25
- # st.write(f"{score:.2f} - {prompt}")
26
  for result in results:
27
  score = float(result['score'])
28
  prompt = result['prompt']
 
21
 
22
  try:
23
  results = response.json()
 
 
24
  for result in results:
25
  score = float(result['score'])
26
  prompt = result['prompt']