Spaces:
Sleeping
Sleeping
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") |