mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-06 09:20:33 +00:00
convert to f-strings
This commit is contained in:
parent
6e3c59d8b2
commit
4dff67cee5
@ -81,14 +81,14 @@ class GPT4All():
|
||||
try:
|
||||
os.makedirs(DEFAULT_MODEL_DIRECTORY, exist_ok=True)
|
||||
except OSError as exc:
|
||||
raise ValueError("Failed to create model download directory at {}: {}. "
|
||||
"Please specify model_path.".format(DEFAULT_MODEL_DIRECTORY, exc))
|
||||
raise ValueError(f"Failed to create model download directory at {DEFAULT_MODEL_DIRECTORY}: {exc}. "
|
||||
"Please specify model_path.")
|
||||
model_path = DEFAULT_MODEL_DIRECTORY
|
||||
else:
|
||||
model_path = model_path.replace("\\", "\\\\")
|
||||
|
||||
if not os.path.exists(model_path):
|
||||
raise ValueError("Invalid model directory: {}".format(model_path))
|
||||
raise ValueError(f"Invalid model directory: {model_path}")
|
||||
|
||||
model_dest = os.path.join(model_path, model_filename).replace("\\", "\\\\")
|
||||
if os.path.exists(model_dest):
|
||||
|
Loading…
Reference in New Issue
Block a user