Add configuration to specify target directory

This commit is contained in:
Hanno Braun 2022-03-17 14:30:33 +01:00
parent 99d0ca2b89
commit 849563f6c3
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ use serde::Deserialize;
pub struct Config { pub struct Config {
pub default_path: Option<PathBuf>, pub default_path: Option<PathBuf>,
pub default_model: Option<PathBuf>, pub default_model: Option<PathBuf>,
pub target_dir: Option<PathBuf>,
} }
impl Config { impl Config {

View File

@ -68,7 +68,7 @@ fn main() -> anyhow::Result<()> {
} }
} }
let model = Model::from_path(path, None)?; let model = Model::from_path(path, config.target_dir)?;
let mut parameters = HashMap::new(); let mut parameters = HashMap::new();
for parameter in args.parameters { for parameter in args.parameters {