refactor: update model input handling in main function

This commit is contained in:
Cheikh Seck committed 2026-04-05 23:47:49 +00:00
1 parent 2ca3ff1a5f
commit 891a36f098
1 file changed
+2 -2
+2 -2
View File
@@ -1,5 +1,5 @@
use anyhow::{bail, Context, Result};
use image::{imageops::FilterType, GenericImageView};
use image::imageops::FilterType;
use ndarray::Array4;
use serde::Serialize;
use std::env;
@@ -41,7 +41,7 @@ fn main() -> Result<()> {
.into_optimized()?
.into_runnable()?;
let result = model.run(tvec!(input.into()))?;
let result = model.run(tvec!(Tensor::from(input)))?;
let scores = result[0].to_array_view::<f32>()?;
let scores = scores.iter().cloned().collect::<Vec<f32>>();