- 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
Open the secrets tab to the left and enter the secrets from the dotenv file.
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')
Open the data tab on the left side and upload your files to the temporary storage:

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.
