mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-16 10:03:42 -07:00
better error UI
This commit is contained in:
parent
640ff5db62
commit
eff8c1e595
3 changed files with 7 additions and 6 deletions
|
@ -154,8 +154,8 @@ class DFMModelInitializer:
|
|||
|
||||
INITIALIZING, DOWNLOADING, INITIALIZED, ERROR, = range(4)
|
||||
downloader : ThreadFileDownloader = None
|
||||
url = dfm_model_info.get_url()
|
||||
status = None
|
||||
|
||||
while True:
|
||||
events = DFMModelInitializer.Events()
|
||||
|
||||
|
@ -168,7 +168,7 @@ class DFMModelInitializer:
|
|||
model_path = dfm_model_info.get_model_path()
|
||||
|
||||
if not model_path.exists():
|
||||
url = dfm_model_info.get_url()
|
||||
|
||||
if url is None:
|
||||
new_status = ERROR
|
||||
events.error = 'Model file is not found and URL is not defined.'
|
||||
|
@ -199,7 +199,7 @@ class DFMModelInitializer:
|
|||
events.download_progress = progress
|
||||
else:
|
||||
new_status = ERROR
|
||||
events.error = error
|
||||
events.error = f'Unable to download {url}, error:' + error
|
||||
|
||||
if new_status != status:
|
||||
events.prev_status_initializing = status == INITIALIZING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue