use anyhow::Result;
use clap::Parser;
use hf_hub::api::sync::ApiBuilder;
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(about = "Download ZUNA weights from HuggingFace (no Python required)")]
struct Args {
#[arg(long, default_value = "Zyphra/ZUNA")]
repo: String,
#[arg(long)]
cache_dir: Option<PathBuf>,
}
const FILES: &[&str] = &[
"model-00001-of-00001.safetensors",
"config.json",
];
fn main() -> Result<()> {
let args = Args::parse();
let mut builder = ApiBuilder::new().with_progress(true);
if let Some(dir) = args.cache_dir {
builder = builder.with_cache_dir(dir);
}
let api = builder.build()?;
let repo = api.model(args.repo);
for filename in FILES {
let path = repo.get(filename)?;
println!("{}", path.display());
}
Ok(())
}