Skip to content

Commit

Permalink
强迫症
Browse files Browse the repository at this point in the history
  • Loading branch information
86maid committed Jun 13, 2024
1 parent 9b3b87f commit 196854d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
/// 初始化内容识别。
pub fn ddddocr_classification() -> anyhow::Result<Ddddocr<'static>> {
let charset = include_str!("../model/common.json");
Ddddocr::new(
include_bytes!("../model/common.onnx"),
serde_json::from_str(charset).unwrap(),
serde_json::from_str(include_str!("../model/common.json")).unwrap(),
)
}

/// 使用旧模型初始化内容识别。
pub fn ddddocr_classification_old() -> anyhow::Result<Ddddocr<'static>> {
let charset = include_str!("../model/common_old.json");
Ddddocr::new(
include_bytes!("../model/common_old.onnx"),
serde_json::from_str(charset).unwrap(),
serde_json::from_str(include_str!("../model/common_old.json")).unwrap(),
)
}

Expand Down

0 comments on commit 196854d

Please sign in to comment.