Skip to content

Commit e623c53

Browse files
committed
chore: improve the log
1 parent 644de5c commit e623c53

File tree

1 file changed

+4
-3
lines changed
  • python_coreml_stable_diffusion

1 file changed

+4
-3
lines changed

python_coreml_stable_diffusion/web.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@ def infer(prompt, steps):
9696
init(args)
9797

9898
except ModuleNotFoundError as moduleNotFound:
99+
print(f'Found that `gradio` is not installed, try to install it automatically')
99100
try:
100101
import subprocess
101102
import sys
102103

103104
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'gradio'])
104-
print(f'Successfully installed package `gradio` automatically!')
105+
print(f'Successfully installed missing package `gradio`.')
106+
print(f'Now re-execute the command :D')
105107
except subprocess.CalledProcessError:
106-
print(f'Automatic package installation failed, try manually executing `pip install gradio`')
107-
raise ModuleNotFoundError('package `gradio` not found, you can install via `pip install gradio`.') from moduleNotFound
108+
print(f'Automatic package installation failed, try manually executing `pip install gradio`, then retry the command again.')

0 commit comments

Comments
 (0)