Skip to content

Commit 49bdb83

Browse files
committed
Update livebook
1 parent e7981c0 commit 49bdb83

3 files changed

Lines changed: 24 additions & 102 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ mise.toml
4848

4949
# Builds
5050
*.tar
51+
52+
# Claude
53+
CLAUDE.md
54+
.claude/
55+

CLAUDE.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

livebooks/image_vision.livemd

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
# Image Vision
22

33
```elixir
4-
Mix.install([
5-
{:image_vision, github: "elixir-image/image_vision"},
6-
{:kino, "~> 0.14"},
7-
# Required for classification (Bumblebee servings).
8-
{:bumblebee, "~> 0.6"},
9-
{:nx, "~> 0.10"},
10-
{:exla, "~> 0.10"},
11-
# Required for detection and segmentation (ONNX runtime).
12-
{:ortex, "~> 0.1"}
13-
])
4+
Mix.install(
5+
[
6+
{:image_vision, github: "elixir-image/image_vision"},
7+
{:kino, "~> 0.14"},
8+
# Required for classification (Bumblebee servings).
9+
{:bumblebee, "~> 0.6"},
10+
{:nx, "~> 0.10"},
11+
{:exla, "~> 0.10"},
12+
# Required for detection and segmentation (ONNX runtime).
13+
{:ortex, "~> 0.1"}
14+
],
15+
config: [
16+
# Tell ImageVision.Application to start the classification serving
17+
# under its own supervisor. Classifier weights (~110 MB) download
18+
# from HuggingFace on first run.
19+
image_vision: [classifier: [autostart: true]]
20+
]
21+
)
1422
```
1523

1624
```elixir
17-
# Start the image classification serving once.
18-
# Model weights (~110 MB) are downloaded from HuggingFace on first run.
25+
# Use EXLA as the Nx backend for any tensor work in this notebook.
1926
Nx.global_default_backend(EXLA.Backend)
20-
21-
{:ok, _} =
22-
Supervisor.start_link(
23-
[Image.Classification.classifier()],
24-
strategy: :one_for_one,
25-
name: ImageVision.Supervisor
26-
)
2727
```
2828

2929
## Classification

0 commit comments

Comments
 (0)