Salvatore Rossitto commited on
Commit
c7e6102
·
1 Parent(s): 810c51b

added download message

Browse files
Files changed (1) hide show
  1. agent_llama_ui.py +1 -0
agent_llama_ui.py CHANGED
@@ -38,6 +38,7 @@ def get_models():
38
  supported_extensions = ["bin","pth","gguf"]
39
  models_directory = "./models" # Replace with the actual path
40
  # Use os.listdir to get a list of filenames in the directory
 
41
  models = os.listdir(models_directory)
42
  # Filter out any subdirectories, if any
43
  models = [model for model in models if (model.lower().split(".")[-1] in supported_extensions) and os.path.isfile(os.path.join(models_directory, model))]
 
38
  supported_extensions = ["bin","pth","gguf"]
39
  models_directory = "./models" # Replace with the actual path
40
  # Use os.listdir to get a list of filenames in the directory
41
+ os.makedirs(models_directory, exist_ok=True)
42
  models = os.listdir(models_directory)
43
  # Filter out any subdirectories, if any
44
  models = [model for model in models if (model.lower().split(".")[-1] in supported_extensions) and os.path.isfile(os.path.join(models_directory, model))]