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:
parent
7b17e4bace
commit
46f1ad13db
@ -16,8 +16,8 @@ class Eval(BaseModel):
|
||||
@router.get("/evals")
|
||||
async def get_evals():
|
||||
# Get all evals from EVALS_DIR
|
||||
input_dir = EVALS_DIR + "/inputs"
|
||||
output_dir = EVALS_DIR + "/outputs"
|
||||
input_dir = f"{EVALS_DIR}/inputs"
|
||||
output_dir = f"{EVALS_DIR}/outputs"
|
||||
|
||||
evals: list[Eval] = []
|
||||
for file in os.listdir(input_dir):
|
||||
|
||||
@ -15,8 +15,8 @@ STACK = "html_tailwind"
|
||||
|
||||
|
||||
async def main():
|
||||
INPUT_DIR = EVALS_DIR + "/inputs"
|
||||
OUTPUT_DIR = EVALS_DIR + "/outputs"
|
||||
INPUT_DIR = f"{EVALS_DIR}/inputs"
|
||||
OUTPUT_DIR = f"{EVALS_DIR}/outputs"
|
||||
|
||||
# Get all the files in the directory (only grab pngs)
|
||||
evals = [f for f in os.listdir(INPUT_DIR) if f.endswith(".png")]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user