encoderfile 0.4.0-rc.1

Distribute and run transformer encoders with a single file.
Documentation
1
2
3
4
5
6
7
8
use crate::{common::FromCliInput, error::ApiError};

pub trait Inference {
    type Input: FromCliInput + serde::de::DeserializeOwned + Sync + Send + utoipa::ToSchema;
    type Output: serde::Serialize + Sync + Send + utoipa::ToSchema;

    fn inference(&self, request: impl Into<Self::Input>) -> Result<Self::Output, ApiError>;
}