Skip to content
Snippets Groups Projects
Commit dee5c448 authored by Max Kimmich's avatar Max Kimmich
Browse files

Improve code readability

parent 300ba08e
No related branches found
No related tags found
No related merge requests found
...@@ -39,8 +39,8 @@ def initialize_run_directory(model: OpenAI | Llama2): ...@@ -39,8 +39,8 @@ def initialize_run_directory(model: OpenAI | Llama2):
response, usage = model(None, run_name_prompt, chat=True) response, usage = model(None, run_name_prompt, chat=True)
model.usage -= usage model.usage -= usage
run_name_match = re.search(r"^\w+$", response, re.MULTILINE) run_name_match = re.search(r"^\w+$", response, re.MULTILINE)
existing_dirs = os.listdir(RUNS_DIR) existing_run_names = os.listdir(RUNS_DIR)
if run_name_match is None or run_name_match.group(0) in existing_dirs: if run_name_match is None or run_name_match.group(0) in existing_run_names:
run_name = uuid4().hex run_name = uuid4().hex
else: else:
run_name = run_name_match.group(0) run_name = run_name_match.group(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment