Skip to content

Latest commit

 

History

History
 
 

notebook

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

notebook

A simple example using a Jupyter Notebook with Cog

Usage

First, make sure you've got the latest version of Cog installed.

Build the image:

cog build

Run the Jupyter Notebook server with Cog:

cog run -p 8888 --debug jupyter notebook --allow-root --ip=0.0.0.0

Copy the notebook URL to your browser. It should look something like this:

http://127.0.0.1:8888/?token=eedb5f511a60b179d1a1b2c6395f0f20c02a08124bae6896

Save any changes you make to your notebook, then export it as a Python script:

jupyter nbconvert --to script my_notebook.ipynb # creates my_notebook.py

Now you can run predictions on the model:

cog predict -i name=Alice