Tesneem commited on
Commit
ee910f3
·
verified ·
1 Parent(s): d7880e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -61,6 +61,12 @@ def init_vector_search() -> MongoDBAtlasVectorSearch:
61
  connection_string=MONGO_URI,
62
  namespace=f"{db_name}.{collection_name}",
63
  embedding=embedding_model,
 
 
 
 
 
 
64
  index_name=index_name,
65
  )
66
 
 
61
  connection_string=MONGO_URI,
62
  namespace=f"{db_name}.{collection_name}",
63
  embedding=embedding_model,
64
+ try:
65
+ test_vector = embedding_model.embed_query("test query")
66
+ print("✅ Embedding model test vector:", test_vector[:5])
67
+ except Exception as e:
68
+ st.error(f"❌ Failed to embed test query: {e}")
69
+ raise
70
  index_name=index_name,
71
  )
72