Skip to content

An open source implementation of NotebookLM that runs on Union

Notifications You must be signed in to change notification settings

unionai-oss/notebook-llama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📖🦙 NotebookLM Clone based on Llama Open Weights Models

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.

Prerequisites

To run this workshop, first you need a Github account.

Then, create Union Serverless account here.

Union Signup

Once you've signed up, going to the Union dashboard should look something like this:

Union Dashboard

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.

Create HuggingFace API key

If you don't already, request access to the Llama 3.2 3B model and Llama 3.2 1B model.

Workshop

If you're here for the workshop, head over to the Google colab notebook here:

Open In Colab

Follow the steps below to run the contents of this repo from a CLI.

Create your environment

Pull the repo:

$ git clone https://github.com/unionai-oss/notebook-llama
$ cd notebook-llama

Create a virtual environment

$ python3 -m venv .venv
$ source .venv/bin/activate

Install the requirements:

$ pip install -r requirements.txt

This will install the union SDK.

Create a secret on Union

Authenticate the workspace session:

$ union create login --auth device-flow --serverless

Then create Union secret for the HuggingFace API key we created in the step above:

$ union create secret huggingface_api_key

You 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.

Quickstart

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.10865

Run the workflow with a local PDF file:

$ union run --remote notebook_llama/pdf_to_podcast.py pdf_to_podcast --pdf_path data/544593v2.full.pdf

Serve the UI App

First, create Union API key called notebook-llama for app serving

$ union create api-key admin --name notebook-llama

You can list the api keys you have with:

$ union get api-key admin

Then, create an Union API key for the notebook-llama app:

$ union create secret union_api_key

Deploy the streamlit app:

$ union deploy apps app.py notebook-llama-streamlit

About

An open source implementation of NotebookLM that runs on Union

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published