From 8fae4022ab1d57aaba0216bab1e769d517a38c93 Mon Sep 17 00:00:00 2001 From: Benjamin Sherriff Date: Fri, 7 Jul 2023 18:23:30 -0400 Subject: [PATCH] Removed rust-bert --- Cargo.toml | 6 +----- src/commands/oai.rs | 15 --------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1cdd0af..bd3ba7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,8 +38,4 @@ features = ["json", "rustls-tls"] [dependencies.diesel] version = "2.1.0" default-features = false -features = ["postgres", "32-column-tables", "serde_json", "r2d2", "with-deprecated"] - -[dependencies.rust-bert] -version = "0.21.0" -features = ["download-libtorch"] \ No newline at end of file +features = ["postgres", "32-column-tables", "serde_json", "r2d2", "with-deprecated"] \ No newline at end of file diff --git a/src/commands/oai.rs b/src/commands/oai.rs index 9341476..c93a357 100644 --- a/src/commands/oai.rs +++ b/src/commands/oai.rs @@ -311,18 +311,3 @@ fn truncate(s: &str, max_chars: usize) -> &str { Some((idx, _)) => &s[..idx], } } - -// fn summarization_model() -> Result { -// let config_resource = RemoteResource::from_pretrained(T5ConfigResources::T5_SMALL); -// let vocab_resource = RemoteResource::from_pretrained(T5VocabResources::T5_SMALL); -// let weights_resource = RemoteResource::from_pretrained(T5ModelResources::T5_SMALL); - -// let summarization_config = SummarizationConfig::new( -// ModelType::T5, -// ModelResource::Torch(Box::new(weights_resource)), -// config_resource, -// vocab_resource, -// None -// ); -// return SummarizationModel::new(summarization_config); -// }