Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramyrahmeni committed Jun 16, 2024
1 parent 2540346 commit f7bb90d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ def main():
st.session_state.pages_and_chunks = elimination_chunks(df, 30)

text_chunks = [item["sentence_chunk"] for item in pages_and_chunks]
st.session_state.embeddings =st.session_state.embedding_model.encode(text_chunks, batch_size=64, convert_to_tensor=True)
st.session_state.embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2", device="cpu")

st.session_state.embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2", device="cpu")
st.session_state.embeddings =st.session_state.embedding_model.encode(text_chunks, batch_size=64, convert_to_tensor=True)

if btn:

Expand Down

0 comments on commit f7bb90d

Please sign in to comment.