ragtest-sakimilo / archive /init_setup.py
lingyit1108's picture
added ux, vision_api, qna.txt
dec332b
raw
history blame
774 Bytes
import main
import pkg_resources
import shutil
import os
### To trigger trulens evaluation
main.main()
### Finally, start streamlit app
leaderboard_path = pkg_resources.resource_filename(
"trulens_eval", "Leaderboard.py"
)
evaluation_path = pkg_resources.resource_filename(
"trulens_eval", "pages/Evaluations.py"
)
ux_path = pkg_resources.resource_filename(
"trulens_eval", "ux"
)
os.makedirs("./pages", exist_ok=True)
shutil.copyfile(leaderboard_path, os.path.join("./pages", "1_Leaderboard.py"))
shutil.copyfile(evaluation_path, os.path.join("./pages", "2_Evaluations.py"))
if os.path.exists("./ux"):
shutil.rmtree("./ux")
shutil.copytree(ux_path, "./ux")