From c68409a68c3959784399177db924fd7c2d75b49d Mon Sep 17 00:00:00 2001 From: Andrea Corradi Date: Mon, 7 Aug 2023 18:14:29 +0200 Subject: [PATCH] Move import --- bert/src/model.rs | 4 +--- web-api/src/embedding.rs | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bert/src/model.rs b/bert/src/model.rs index 92bc607c6..f5cff2a09 100644 --- a/bert/src/model.rs +++ b/bert/src/model.rs @@ -14,7 +14,7 @@ use std::{fs::File, io::BufReader, path::PathBuf}; -use anyhow::bail; +use anyhow::{bail, Result}; use derive_more::{Deref, From}; use ndarray::CowArray; use ort::{ @@ -49,8 +49,6 @@ enum Dimension { Dynamic(DynDim), } -use anyhow::Result; - impl

Config

{ fn extract_facts( &self, diff --git a/web-api/src/embedding.rs b/web-api/src/embedding.rs index 8378f8333..6f064f9c6 100644 --- a/web-api/src/embedding.rs +++ b/web-api/src/embedding.rs @@ -52,8 +52,7 @@ impl Embedder { } pub(crate) fn run(&self, sequence: &str) -> Result { - self - .embedder + self.embedder .run(sequence) .map_err(InternalError::from_std)? .normalize()