Merge branch 'master' into beacon
This commit is contained in:
commit
3f67044977
62 changed files with 713 additions and 780 deletions
|
|
@ -112,9 +112,7 @@ impl Download {
|
|||
|
||||
pub fn start(&mut self) -> Task<Update> {
|
||||
match self.state {
|
||||
State::Idle { .. }
|
||||
| State::Finished { .. }
|
||||
| State::Errored { .. } => {
|
||||
State::Idle | State::Finished | State::Errored => {
|
||||
let (task, handle) = Task::sip(
|
||||
download(
|
||||
"https://huggingface.co/\
|
||||
|
|
@ -156,10 +154,10 @@ impl Download {
|
|||
|
||||
pub fn view(&self) -> Element<Message> {
|
||||
let current_progress = match &self.state {
|
||||
State::Idle { .. } => 0.0,
|
||||
State::Idle => 0.0,
|
||||
State::Downloading { progress, .. } => *progress,
|
||||
State::Finished { .. } => 100.0,
|
||||
State::Errored { .. } => 0.0,
|
||||
State::Finished => 100.0,
|
||||
State::Errored => 0.0,
|
||||
};
|
||||
|
||||
let progress_bar = progress_bar(0.0..=100.0, current_progress);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue