Skip to content

zhaw-iwi/advanced-rag-solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Quick guide for colab

  • This guide allows you to use my code in google colab without mounting google drive and use hidden secrets.

Add the following lines at the start

!pip install PyPDF2
!pip install langchain-community
!pip install faiss-cpu
!pip install groq

Edit Secrets

Open the secrets tab to the left and enter the secrets from the dotenv file.

image

Replace dotenv imports

instead of reading the keys from a .env file read them from colab directly:

from google.colab import userdata
google_api_key = userdata.get('GOOGLE_API_KEY')
openai_api_key = userdata.get('OPENAI_API_KEY')
groq_api_key = userdata.get('GROQ_API_KEY')

Upload data to Colab

Open the data tab on the left side and upload your files to the temporary storage: image

Adjust path in the notebook:

glob_path = "/content/*.pdf"

Note that you can also create your faiss folder to store the vector store in the temporary location. If you want to do it forever, you need to mount google drive.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors