thefcraft commited on
Commit
6ec3818
1 Parent(s): af641fe

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
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: