jchen8000 commited on
Commit
7a40e7d
·
1 Parent(s): 6eec9cd

update server.py

Browse files
Files changed (1) hide show
  1. server.py +9 -2
server.py CHANGED
@@ -172,10 +172,17 @@ def create_interface():
172
  allowed_paths=["cache", "css", "extensions", "js"]
173
  )
174
 
175
- if __name__ == "__main__":
 
 
 
 
176
 
 
 
 
177
  logger.info("Starting Text generation web UI")
178
- logger.info("Need to download models...")
179
  do_cmd_flags_warnings()
180
 
181
  # Load custom settings
 
172
  allowed_paths=["cache", "css", "extensions", "js"]
173
  )
174
 
175
+ def download_model(model_name):
176
+ logger.info("Downloading " + model_name)
177
+ os.system(r"python3 download-model.py " + model_name)
178
+ logger.info("Download completed " + model_name)
179
+
180
 
181
+ if __name__ == "__main__":
182
+ download_model("google/flan-t5-xl")
183
+ download_model("meta-llama/Meta-Llama-3-8B-Instruct")
184
  logger.info("Starting Text generation web UI")
185
+
186
  do_cmd_flags_warnings()
187
 
188
  # Load custom settings