DrishtiSharma commited on
Commit
2bc093c
·
verified ·
1 Parent(s): f172bb5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -74,7 +74,7 @@ if pdf_path and not st.session_state.processed:
74
  # Step 3: Chunking
75
  with st.spinner("Chunking the document..."):
76
  model_name = "nomic-ai/modernbert-embed-base"
77
- embedding_model = HuggingFaceEmbeddings(model_name=model_name, model_kwargs={'device': 'cpu'})
78
  text_splitter = SemanticChunker(embedding_model)
79
  documents = text_splitter.split_documents(docs)
80
  st.session_state.documents = documents
 
74
  # Step 3: Chunking
75
  with st.spinner("Chunking the document..."):
76
  model_name = "nomic-ai/modernbert-embed-base"
77
+ embedding_model = HuggingFaceEmbeddings(model_name=model_name, model_kwargs={'device': 'cpu'}, encode_kwargs= {'normalize_embeddings': False})
78
  text_splitter = SemanticChunker(embedding_model)
79
  documents = text_splitter.split_documents(docs)
80
  st.session_state.documents = documents