File size: 396 Bytes
132ac81
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from os import listdir, makedirs
from os.path import isfile, join
from time import time
import pandas as pd
from constants import  PROMPTS_FOLDER
def load_prompt(filename: str) -> str:
    with open(join(PROMPTS_FOLDER, filename), "r") as f:
        return f.read()

def format_time(s: float) -> str:
    m, s = divmod(s, 60)
    h, m = divmod(m, 60)
    return f"{int(h)}h {int(m)}m {int(s)}s"