From 2c280007e8abad5eb4186ce0223fd7d60fd3fc58 Mon Sep 17 00:00:00 2001 From: Patrick von Platen Date: Wed, 23 Aug 2023 13:26:21 +0200 Subject: [PATCH] Apply suggestions from code review --- README.md | 14 ++------------ candle-book/src/guide/installation.md | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 12249d24..a1415535 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,11 @@ and ease of use. Try our online demos: Make sure that you have [`candle-core`](https://github.com/huggingface/candle/tree/main/candle-core) correctly installed as described in [**Installation**](https://huggingface.github.io/candle/guide/installation.html). Let's see how to run a simple matrix multiplication. - -We will need the [`anyhow`](https://docs.rs/anyhow/latest/anyhow/) package for our example, so let's also add it to our app. - -```bash -cd myapp -cargo add anyhow -``` - -Next, write the following to your `myapp/src/main.rs` file: - +Write the following to your `myapp/src/main.rs` file: ```rust -use anyhow::Result; use candle_core::{Device, Tensor}; -fn main() -> Result<()> { +fn main() -> Result<(), Box> { let device = Device::Cpu; let a = Tensor::randn(0f32, 1., (2, 3), &device)?; diff --git a/candle-book/src/guide/installation.md b/candle-book/src/guide/installation.md index 56d73ad3..0b429566 100644 --- a/candle-book/src/guide/installation.md +++ b/candle-book/src/guide/installation.md @@ -45,7 +45,7 @@ cd myapp cargo add --git https://github.com/huggingface/candle.git candle-core ``` -Finally, run `cargo build` to make sure everything can be correctly built. +Finally, run `cargo run` to make sure everything can be correctly built. ```bash cargo run