File size: 774 Bytes
dec332b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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")