2025-03-17 09:14:56 -05:00
|
|
|
// Libraries
|
|
|
|
|
use std::env;
|
|
|
|
|
|
|
|
|
|
// Enums
|
|
|
|
|
pub enum OperationMode {
|
|
|
|
|
Training,
|
|
|
|
|
Infrence,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Functions
|
|
|
|
|
pub fn get_operation_mode() -> Option<OperationMode> {
|
|
|
|
|
// Getting command line arguments
|
|
|
|
|
let args: Vec<String> = env::args().collect();
|
|
|
|
|
|
|
|
|
|
// Getting operation mode
|
2025-03-17 11:13:40 -05:00
|
|
|
match args[1].as_str() {
|
2025-03-17 09:14:56 -05:00
|
|
|
"training" => Some(OperationMode::Training),
|
|
|
|
|
"infrence" => Some(OperationMode::Infrence),
|
|
|
|
|
_ => None,
|
|
|
|
|
}
|
|
|
|
|
}
|