diff --git a/app.py b/app.py index 807be23..d704824 100644 --- a/app.py +++ b/app.py @@ -32,9 +32,6 @@ def translate_role_for_streamlit(user_role): st.session_state.embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2", device="cpu") if 'pages_and_chunks' not in st.session_state: st.session_state.pages_and_chunks = None -st.write(f"Embeddings: {st.session_state.embeddings}") -st.write(f"Embedding Model: {st.session_state.embedding_model}") -st.write(f"Pages and Chunks: {st.session_state.pages_and_chunks}") # Initialize chat session in Streamlit if not already present def text_formatter(text: str) -> str: """Performs minor formatting on text.""" @@ -388,12 +385,7 @@ def main(): 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.write(f"Embeddings: {st.session_state.embeddings}") - st.write(f"Embedding Model: {st.session_state.embedding_model}") - st.write(f"Pages and Chunks: {st.session_state.pages_and_chunks}") if btn: - - if query: with st.spinner('Generating response...'): rep=ask(query,st.session_state.embedding_model,st.session_state.embeddings,st.session_state.pages_and_chunks)