File size: 1,044 Bytes
91ab7d8
 
 
d3e47d3
 
91ab7d8
79584a6
 
 
 
 
 
 
 
 
 
 
ce93021
 
79584a6
 
 
 
d3e47d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91ab7d8
 
 
 
 
 
 
 
 
 
 
 
 
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
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/zsh
# -*- coding: utf-8 -*-

# Get parent directory absolute path
REPO_DIR="$(pwd)"

# Check if .venv exists, if not create it
if [[ ! -d .venv ]]; then
    # Create virtual environments
    python3 -m venv .venv

    # Activate virtual environment
    source .venv/bin/activate

    # Update pip 
    python -m pip install -U pip

    # Install dev requirements
    pip install -U -r dev-requirements.txt
    # Install requirements
    pip install -U -r requirements.txt

fi

# Check if .venv is active, if not activate it
if [[ -z $VIRTUAL_ENV ]]; then
    source .venv/bin/activate
fi


# Login: 
USER=$(huggingface-cli whoami)
if [[ $USER == "Not logged in" ]]; then

    #Get .env variables
    set -o allexport
    source .env 
    set +o allexport

    echo "Not logged in"
    huggingface-cli login --token $TOKEN
fi
# -->> Tunables <<---------------------


# -->> Definitions <<------------------


# -->> API <<--------------------------


# -->> Execute <<----------------------


# -->> Export <<-----------------------