-
Notifications
You must be signed in to change notification settings - Fork 0
/
launch_taskweaver.sh
executable file
·39 lines (37 loc) · 1.25 KB
/
launch_taskweaver.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
#!/bin/bash
# update
echo "updating TaskWeaver"
git pull
# Function to calculate the center position
center_text() {
local text="$1"
local width=$(tput cols)
local padding=$(( (width - ${#text}) / 2 ))
((padding < 0)) && padding=0
printf "%*s%s\n" "$padding" '' "$text"
}
# Display menu
delimiter="################################################################"
center_text "${delimiter}"
center_text " _____ _ ___ _ ____ _____ ___ _____ ___ "
center_text " |_ _/_\ / __| |/ /\ \ / / __| /_\ \ / / __| _ \ "
center_text " | |/ _ \\__ \ ' < \ \/\/ /| _| / _ \ V /| _|| /"
center_text " |_/_/ \_\___/_|\_\ \_/\_/ |___/_/ \_\_/ |___|_|_\ "
center_text " "
center_text "${delimiter}"
# activate conda
eval "$(conda shell.zsh hook)"
conda activate taskweaver
center_text "${delimiter}"
center_text "Activated conda virtual environment: $CONDA_DEFAULT_ENV"
# activate python venv
source /home/$(whoami)/TaskWeaver/TW/bin/activate
venv_name123=$(basename "$VIRTUAL_ENV")
center_text "Activated python virtual environment: $venv_name123"
pyth=$(python --version)
center_text "$pyth"
center_text "${delimiter}"
# start webui
echo "Starting WebUI"
cd playground/UI/
chainlit run app.py