import streamlit as st from streamlit_lottie import st_lottie def faq(): st.markdown( """ # FAQ ## How does Document Q&A Bot work? When you upload a document (in Pdf, word, csv or txt format), it will be divided into smaller chunks and stored in a special type of database called a vector index that allows for semantic search and retrieval. When you ask a question, our Q&A bot will first look through the document chunks and find the most relevant ones using the vector index. Then, it will use open-source LLM model named Google Palm and will provide the final answer. ## Is my data safe? Yes, your data is safe. Our bot does not store your documents or questions. All uploaded data is deleted after you close the browser tab. ## Why does it take so long to index my document? Since, this is a sample QA bot project that uses open-source model and doesn't have much resource capabilities like GPU, it may take time to index your document based on the size of the document. ## Are the answers 100% accurate? No, the answers are not 100% accurate. But for most use cases, our QA bot is very accurate and can answer most questions. Always check with the sources to make sure that the answers are correct. """ ) def sidebar(): with st.sidebar: st.markdown("## Google Palm") st.success('API key already provided!', icon='✅') st.markdown( "## How to use QA bot\n" "1. Upload a pdf, docx, or a txt file📄\n" "2. Ask questions about the document💬\n" ) # st.session_state["OPENAI_API_KEY"] = api_key_input st.markdown("---") st.markdown("# About") st.markdown( "🤖 QA bot allows you to ask questions about your " "documents and get accurate answers with citations. " ) st.markdown("Created by [Krishna Kumar](https://www.linkedin.com/in/krishna-kumar-yadav-726831105/)") st.markdown("---") faq()