-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
38 lines (34 loc) · 1.11 KB
/
README
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
28
29
30
31
32
33
34
35
36
37
## Install
* add GATE_HOME to bashrc
'''
vim ~/.bashrc
'''
add following
'''
export GATE_HOME=/PATH/TO/GATE
'''
* create conda env
'''
conda env create -f environment.yml
'''
## Train
'''
python ifpriDiseaseTrain.py --trainFolder data/taggedData/
python experimentManager.py --trainInput diseaseType.json --readerType json --nFold 5 --savePath modeldt/ --configFile diseaseTypeTrain.config --gpu --calSampleWeight --x_fields text --y_field label --modelType BERT_Simple --debug
'''
## Apply
'''
python ifpriDiseaseApp.py --inputFolder data/taggedData/ --model modeldt/fold_0/ --gpu --config diseaseTypeTrain.config
python ifpriDiseaseApp.py --model modeldt/fold_0/ --gpu --config diseaseTypeTrain.config --inputURL https://www.growingproduce.com/fruits/grapes/spotted-lanternfly-found-virginia-grapes/
'''
## CSV Output
* activate ifpriDisease conda envoriment
* create a empty folder for new outputs
* copy the subfolders in output to the new folder
* run exportjson2csv.py [new_output_folder] [csv file name]
'''
conda activate ifpriDisease
mkdir Jan
cp -r output/*_Jan_2024 Jan
python exportjson2csv.py Jan/ Jan_2024.csv
'''