This commit is contained in:
Ubuntu
2023-06-27 17:27:54 +00:00
parent e29dae044d
commit 926fffa0b7
4 changed files with 84 additions and 62 deletions

View File

@ -397,7 +397,6 @@ impl Api {
let parallel_failures_semaphore = parallel_failures_semaphore.clone();
let progress = progressbar.clone();
handles.push(tokio::spawn(async move {
println!("Start {start:?} - {stop:?}");
let mut chunk = Self::download_chunk(&client, &url, &filename, start, stop).await;
let mut i = 0;
if parallel_failures > 0 {

View File

@ -53,9 +53,9 @@ impl Cache {
let commit_hash = std::fs::read_to_string(commit_path).ok()?;
let mut pointer_path = self.pointer_path(repo, &commit_hash);
pointer_path.push(filename);
if pointer_path.exists(){
if pointer_path.exists() {
Some(pointer_path)
}else{
} else {
None
}
}
@ -150,7 +150,7 @@ impl Repo {
/// The normalized folder nameof the repo within the cache directory
pub fn folder_name(&self) -> String {
let prefix = match self.repo_type{
let prefix = match self.repo_type {
RepoType::Model => "models",
RepoType::Dataset => "datasets",
RepoType::Space => "spaces",