#!/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 <<-----------------------