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

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📖🦙 NotebookLlama on Union

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.

Setup

Account creation and API key setup

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.

Start a workspace

We'll be running this workshop in a Union workspace. To start the default workspace, click on the Workspaces button on the left and click on the start switch.

Start Workspace

Once started, you can click on Open in VSCode to open the workspace in your browser.

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://www.biorxiv.org/content/10.1101/544593v2.full.pdf

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

About

An open source implementation of NotebookLM that runs on Union

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published