use dotenv::dotenv;
use karlo_rs;
use std::env;
use tokio;
#[tokio::main]
async fn main() {
dotenv().ok();
let text = "A newyork home, steampunk, snowy";
let output_name = "sample_img/output"; let api_key = env::var("API_KEY").expect("API_KEY not set in .env file");
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 api_key = "689f8a838197c912e9255e8ef26d3234";
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),
}
}