Harisri's picture
Update run.sh
c3153bb verified
Raw
History Blame
912 Bytes
#!/bin/bash
# Path to the lang_list.txt file
LANG_LIST_PATH="/home/user/.AI4Bharat_Xlit_Models/en2indic/lang_list.txt"
# Create the directory if it doesn't exist
mkdir -p /home/user/.AI4Bharat_Xlit_Models/en2indic/
# Check if lang_list.txt already exists, if not, create it with the necessary languages
if [ ! -f "$LANG_LIST_PATH" ]; then
echo -e "en\nas\nbn\nbrx\ngom\ngu\nhi\nkn\nks\nmai\nml\nmni\nmr\nne\nor\npa\nsa\nsd\nsi\nta\nte\nur" > "$LANG_LIST_PATH"
fi
# Hardcode the Conda environment name
CONDA_ENV="rten-env"
# Initialize Conda
eval "$(conda shell.bash hook)"
# Ensure that Conda is installed and the environment exists
if conda info --envs | grep -q "$CONDA_ENV"; then
echo "Activating Conda environment: $CONDA_ENV"
conda activate $CONDA_ENV
else
echo "Conda environment $CONDA_ENV not found. Please ensure it is created."
exit 1
fi
# Run the application
python app.py