Notebook Gallery offers ready-to-use notebook examples for popular AI scenarios. You can preview, run, or customize them in DSW instances.
Quick start
Watch this video to get started with Notebook Gallery:
Use Notebook Gallery
To access Notebook Gallery in the PAI console:
-
Log on to the PAI console.
-
Go to the Notebook Gallery page.
You can open the Notebook Gallery page in either of the following ways:
-
Method 1:
In the left navigation pane, choose Quick Start > Notebook Gallery.
-
Method 2:
-
In the left navigation pane, click Workspaces. On the Workspace List page, click the workspace to open.
-
In the left navigation pane of the workspace, choose Quick Start > Notebook Gallery.
-
-
-
On the Notebook Gallery page, you can:
-
① Search for examples
Click a category under Hot Searches to filter examples, or search by name or description.
-
② Run an example in DSW
-
Click Open in DSW on an example card or on the details page of the example.
-
In the Select an instance to open the notebook dialog box, select a workspace and an existing DSW instance, then click Open Notebook. Use a DSW instance that matches the recommended runtime image and instance specifications for the notebook.
-
In the Notebook tab of the DSW instance, view, modify, or run the example. For more information, see Quick start.
-
-
③ Share or preview an example
Click an example card to view its details. Click Share to share the example link.
-
FAQ
Q: How to fix 'module not found' errors?
This error usually occurs because the required module is not pre-installed in your current image. Try one of the following solutions:
-
Switch to the recommended image for the example. Different images include different pre-installed Python packages. For example, ModelScope images typically include
torchandtransformers. -
If you want to keep the current image, manually install the missing package before running the example:
pip install torch(replace with the actual package name). -
Note: The Notebook and Terminal in JupyterLab may use different Python environments. If the package is installed in the Terminal but the Notebook still reports an error, run
!pip install <package_name>in a notebook cell to install it in the correct environment.
Intelligent Code Lab
Intelligent Code Lab syncs with Notebook Gallery in real time and provides best practices for AIGC, ModelScope, Llama, and other scenarios without requiring login. Visit the Notebook Gallery website to browse AI best practices. On the Intelligent Code Lab page, you can:
-
① Search for examples
Click a category under Hot Searches to filter examples, or search by name or description.
-
② Run an example in DSW
-
On an example card, click Open in DSW.
-
On the Select an instance to open the notebook page, select a DSW instance and click Open Notebook.
The page redirects to the DSW development page and opens the notebook file. View, modify, or run the example.
NoteIf no suitable DSW instance is available, click Create a suitable instance.
-
-
③ Share or preview an example
Click an example card to view its details. Click Share to get a shareable link, or open it in a browser to preview the example.
-
④ Preview external notebooks
In the search box in the upper-right corner, enter the URL of a
.ipynbfile from ModelScope or DashScope to preview and develop it. For example: https://github.com/dashscope/dash-cookbook/blob/main/examples/vectorDB_enhanced_QA_with_LLM.ipynb.