Click Here to view Google Colab based implimentation of a PDF Chat Bot where the Uploaded PDF is embedded into a VectorDB (here Pinecone) and proper search query to fetch desired answers from the uploaded PDF.
Click Here to view the deployed DocuChat Model with GeminiPro and FAISS VectorEmbedding.
To use the DocuChatv1 in Google Colab,follow these steps:
-
Visit the Google colab file by clicking here
-
Create a copy of the Colab file on your drive
-
Generate Pinecone API Key:
- Once logged in, navigate to the API Keys section in the Pinecone dashboard.
- Click on Create API Key and copy the generated key.
-
Create a Pinecone Index:
- Click on Create Index.
- Choose an index name, set the dimension (e.g., 768 for BERT-based models), and specify the metric (e.g., cosine similarity).
- Click Create.
-
Change the Index Name to your own Index Name
pc = Pinecone(api_key=PINECONE_API_KEY)
index_name = pc.Index('ragchat') #change it to your pinecone index name
from langchain.vectorstores import Pinecone as PC
os.environ['PINECONE_API_KEY']
docs_chunks = [t.page_content for t in docs]
pinecone_index = PC.from_texts(
docs_chunks,
embeddings,
index_name='ragchat' #change it to your Pinecone Index
)
-
Set Up Hugging Face API
- Create a Hugging Face Account:
- Go to Hugging Face and sign up or log in.
-
Generate Hugging Face Acess Token:
- Navigate to the Settings section of your Hugging Face account.
- Under Access Tokens, create a new token and copy it.
-
Add the API Keys to Colab:
- Add all the API Keys to the Secrets section of your Colab File
-
Run all the cells of the Colab File
To use the DocuChatv2 in your local system,follow these steps: