Modificated string's concatenations format to f-strings. Code became more clear and also we avoid potential type's mismatch

This commit is contained in:
igeni 2024-03-27 20:15:27 +03:00
parent 7b17e4bace
commit 46f1ad13db
No known key found for this signature in database
GPG Key ID: 16E4FC1175A10D63
2 changed files with 4 additions and 4 deletions

View File

@ -16,8 +16,8 @@ class Eval(BaseModel):
@router.get("/evals") @router.get("/evals")
async def get_evals(): async def get_evals():
# Get all evals from EVALS_DIR # Get all evals from EVALS_DIR
input_dir = EVALS_DIR + "/inputs" input_dir = f"{EVALS_DIR}/inputs"
output_dir = EVALS_DIR + "/outputs" output_dir = f"{EVALS_DIR}/outputs"
evals: list[Eval] = [] evals: list[Eval] = []
for file in os.listdir(input_dir): for file in os.listdir(input_dir):

View File

@ -15,8 +15,8 @@ STACK = "html_tailwind"
async def main(): async def main():
INPUT_DIR = EVALS_DIR + "/inputs" INPUT_DIR = f"{EVALS_DIR}/inputs"
OUTPUT_DIR = EVALS_DIR + "/outputs" OUTPUT_DIR = f"{EVALS_DIR}/outputs"
# Get all the files in the directory (only grab pngs) # Get all the files in the directory (only grab pngs)
evals = [f for f in os.listdir(INPUT_DIR) if f.endswith(".png")] evals = [f for f in os.listdir(INPUT_DIR) if f.endswith(".png")]