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")
|
@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):
|
||||||
|
|||||||
@ -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")]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user