use dotenv::dotenv;
use karlo_rs;
use std::env;
use tokio;
#[tokio::main]
async fn main() {
dotenv().ok();
let api_key = env::var("API_KEY").expect("API_KEY not set in .env file");
let text = "A sunset in the universe";
let output_name = "sample_img/output"; let batch_size = Some(2);
match karlo_rs::generate_image(text, output_name, &api_key, batch_size).await {
Ok(_) => println!("Image saved to {}", output_name),
Err(e) => eprintln!("Error: {}", e),
}
let input_path = "sample_img/output_1.png";
let output_name = "sample_img/output_variation"; let batch_size = None;
match karlo_rs::generate_variations(input_path, output_name, &api_key, batch_size).await {
Ok(_) => println!("Variation image saved to {}", output_name),
Err(e) => eprintln!("Error: {}", e),
}
}