This repo contains an open source implementation of NotebookLM that runs on Union. This repo
adapts the NotebookLlama example in Meta's
llama-cookbook repo.
- 🌠 Workshop slides: https://go.union.ai/workshop-notebook-lm-clone
- 📱 Example app: https://shy-sun-51a14.apps.serverless-1.us-east-2.s.union.ai/
To run this workshop, first you need a Github account.
Then, create Union Serverless account here.
Once you've signed up, going to the Union dashboard should look something like this:
On the bottom right, you should see that you have $ 30 in credits, which is
sufficient for running this workshop.
Next, if you don't already have one, create a HuggingFace account. On the HuggingFace website, then, create a HuggingFace API key here.
If you don't already, request access to the Llama 3.2 3B model and Llama 3.2 1B model.
If you're here for the workshop, head over to the Google colab notebook here:
Follow the steps below to run the contents of this repo from a CLI.
Pull the repo:
$ git clone https://github.com/unionai-oss/notebook-llama
$ cd notebook-llamaCreate a virtual environment
$ python3 -m venv .venv
$ source .venv/bin/activateInstall the requirements:
$ pip install -r requirements.txtThis will install the union SDK.
Authenticate the workspace session:
$ union create login --auth device-flow --serverlessThen create Union secret for the HuggingFace API key we created in the step above:
$ union create secret huggingface_api_keyYou should see a Enter secret value: prompt to paste on the secret value.
his will create a secret in Union with the name huggingface_api_key.
Run the workflow with a PDF file from a URL:
$ union run --remote notebook_llama/pdf_to_podcast.py pdf_to_podcast --pdf_path https://arxiv.org/pdf/2503.10865Run the workflow with a local PDF file:
$ union run --remote notebook_llama/pdf_to_podcast.py pdf_to_podcast --pdf_path data/544593v2.full.pdfFirst, create Union API key called notebook-llama for app serving
$ union create api-key admin --name notebook-llamaYou can list the api keys you have with:
$ union get api-key adminThen, create an Union API key for the notebook-llama app:
$ union create secret union_api_keyDeploy the streamlit app:
$ union deploy apps app.py notebook-llama-streamlit

