Properly format exceptions in the UI

This commit is contained in:
oobabooga 2023-08-03 06:57:21 -07:00
parent 3390196a14
commit 3e70bce576
2 changed files with 4 additions and 4 deletions

View file

@ -75,7 +75,7 @@ def load_model_wrapper(selected_model, loader, autoload=False):
exc = traceback.format_exc()
logger.error('Failed to load the model.')
print(exc)
yield exc
yield exc.replace('\n', '\n\n')
def load_lora_wrapper(selected_loras):
@ -159,7 +159,7 @@ def download_model_wrapper(repo_id, progress=gr.Progress()):
yield ("Done!")
except:
progress(1.0)
yield traceback.format_exc()
yield traceback.format_exc().replace('\n', '\n\n')
def create_model_menus():