Update main.py
Browse files
main.py
CHANGED
@@ -22,7 +22,8 @@ def download_model(force = False):
|
|
22 |
except:
|
23 |
if force == False: return download_model(force=True)
|
24 |
print('Something went wrong\ndownload model via link: `https://huggingface.co/thefcraft/prompt-generator-stable-diffusion/tree/main`')
|
25 |
-
|
|
|
26 |
if not os.path.exists('models.pickle'): download_model()
|
27 |
|
28 |
with open('models.pickle', 'rb')as f:
|
|
|
22 |
except:
|
23 |
if force == False: return download_model(force=True)
|
24 |
print('Something went wrong\ndownload model via link: `https://huggingface.co/thefcraft/prompt-generator-stable-diffusion/tree/main`')
|
25 |
+
try: os.chdir(os.path.abspath(os.path.dirname(__file__)))
|
26 |
+
except: pass
|
27 |
if not os.path.exists('models.pickle'): download_model()
|
28 |
|
29 |
with open('models.pickle', 'rb')as f:
|