MCPcopy Create free account
hub / github.com/WasmEdge/mediapipe-rs / parse_args

Function parse_args

examples/text_classification.rs:3–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1use mediapipe_rs::tasks::text::TextClassifierBuilder;
2
3fn parse_args() -> Result<String, Box<dyn std::error::Error>> {
4 let args: Vec<String> = std::env::args().collect();
5 if args.len() != 2 {
6 return Err(format!("Usage {} model_path", args[0]).into());
7 }
8 Ok(args[1].clone())
9}
10
11fn main() -> Result<(), Box<dyn std::error::Error>> {
12 let model_path = parse_args()?;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected