thejagstudio commited on
Commit
620af75
·
verified ·
1 Parent(s): aab749f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -9
main.py CHANGED
@@ -74,15 +74,15 @@ class MyEmbeddingFunction(EmbeddingFunction):
74
  except Exception as e:
75
  print("Error in Embeding :",str(e))
76
 
77
- # try:
78
- # CHROMA_PATH = "chroma"
79
- # custom_embeddings = MyEmbeddingFunction()
80
- # db = Chroma(
81
- # persist_directory=CHROMA_PATH,embedding_function=custom_embeddings
82
- # )
83
- # #
84
- # except Exception as e:
85
- # print("Error in database :",str(e))
86
 
87
  # Initialize the database without persist_directory
88
  try:
 
74
  except Exception as e:
75
  print("Error in Embeding :",str(e))
76
 
77
+ try:
78
+ CHROMA_PATH = "chroma"
79
+ custom_embeddings = MyEmbeddingFunction()
80
+ db = Chroma(
81
+ persist_directory=CHROMA_PATH,embedding_function=custom_embeddings
82
+ )
83
+ #
84
+ except Exception as e:
85
+ print("Error in database :",str(e))
86
 
87
  # Initialize the database without persist_directory
88
  try: