Skip to content

Commit

Permalink
v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed May 5, 2024
1 parent da14b40 commit 6bc627f
Show file tree
Hide file tree
Showing 7 changed files with 982 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["hfd-cli"]
members = ["hfd", "hfd-cli"]
resolver = "2"

[profile.release]
Expand Down
4 changes: 2 additions & 2 deletions hfd-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "hfd-cli"
version = "0.1.1"
version = "0.1.3"
edition = "2021"

[dependencies]
tokio = { version = "1.37.0", features = ["full"] }
clap = { version= "4.5.4", features=["derive"] }
hf-hub ={ version="0.3.2", features = ["tokio", "rustls-tls"], default-features = false }
libhfd = { path = "../hfd" }

[[bin]]
name = "hfd"
Expand Down
2 changes: 1 addition & 1 deletion hfd-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use tokio;

#[tokio::main]
async fn main() {
let api = hf_hub::api::tokio::Api::new().unwrap();
let api = libhfd::api::tokio::Api::new().unwrap();

let _filename = api
.model("meta-llama/Llama-2-7b-hf".to_string())
Expand Down
24 changes: 24 additions & 0 deletions hfd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "libhfd"
version = "0.1.0"
edition = "2021"

[dependencies]
tokio = { version = "1.37.0", features = ["full"] }
reqwest = { version = "0.12.4", default-features = false, features = ["json", "charset", "http2", "macos-system-configuration", "rustls-tls"] }
rustls = { version = "0.23.5" }
indicatif = { version = "0.17.8" }
serde = { version = "1.0.200", features = ["derive"] }
serde_json = { version = "1.0.116" }

futures = "0.3.30"
thiserror = "1.0.59"
log = "0.4.21"
dirs = "5.0.1"
http = "1.1.0"
rand = "0.8.5"
num_cpus = "1.16.0"

[lib]
name = "libhfd"
path = "src/lib.rs"
15 changes: 15 additions & 0 deletions hfd/src/api/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use serde::Deserialize;

pub mod tokio;

#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct Siblings {
pub rfilename: String,
}

#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct RepoInfo {
pub siblings: Vec<Siblings>,

pub sha: String,
}
Loading

0 comments on commit 6bc627f

Please sign in to comment.