-
Notifications
You must be signed in to change notification settings - Fork 0
/
initial_setup.sh
executable file
·44 lines (34 loc) · 1.69 KB
/
initial_setup.sh
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
38
39
40
41
42
43
#!/bin/bash
echo -e "\e[94mCreating a new virtual environment...\e[0m"
python3 -m venv .venv
echo -e "\e[94mActivating the virtual environment...\e[0m"
source .venv/bin/activate
echo -e "\e[94mInstalling dependencies from requirements.txt...\e[0m"
pip install -r requirements.txt
echo -e "\e[94mDownloading spacy language model...\e[0m"
python -m spacy download en_core_web_sm
echo -e "\e[94mMoving into the 'data' directory...\e[0m"
cd data || { echo "Directory 'data' does not exist. Exiting."; exit 1; }
echo -e "\e[94mDownloading embeddings_icd.npy...\e[0m"
wget https://github.com/Padraig20/EHR-Generator/releases/download/Embeddings/embeddings_icd.npy
echo -e "\e[94mDownloading embeddings_ndc.npy...\e[0m"
wget https://github.com/Padraig20/EHR-Generator/releases/download/Embeddings/embeddings_ndc.npy
echo -e "\e[94mDownloading the necessary models...\e[0m"
cd ..
mkdir models
cd models || { echo "Directory 'models' does not exist. Exiting."; exit 1; }
wget https://github.com/Padraig20/EHR-Generator/releases/download/models/medcond.zip
wget https://github.com/Padraig20/EHR-Generator/releases/download/models/medication.zip
wget https://github.com/Padraig20/EHR-Generator/releases/download/models/procedure.zip
wget https://github.com/Padraig20/EHR-Generator/releases/download/models/symptom.zip
unzip medcond.zip
unzip medication.zip
unzip procedure.zip
unzip symptom.zip
rm medcond.zip
rm medication.zip
rm procedure.zip
rm symptom.zip
echo -e "\e[95m\nSetup complete.\e[0m"
echo -e "\e[95mMove to the 'src' folder and invoke 'python api.py' to start the backend server.\n\e[0m"
echo -e "\e[91mMake sure to activate the virtual environment before running the server using 'source .venv/bin/activate'.\e[0m"