push folder restructuring

This commit is contained in:
Gokul Mohanarangan
2023-07-10 20:13:58 +05:30
parent 4e32cfb1bd
commit acf0d9e9e2
5 changed files with 22 additions and 7 deletions

15
scripts/clear_artefacts.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Directory to search for Python files
directory="."
# Pattern to match Python files (e.g., "*.py" for all .py files)
text_file_pattern="transcript_*.txt"
pickle_file_pattern="*.pkl"
html_file_pattern="*.html"
png_file_pattern="*.png"
find "$directory" -type f -name "$text_file_pattern" -delete
find "$directory" -type f -name "$pickle_file_pattern" -delete
find "$directory" -type f -name "$html_file_pattern" -delete
find "$directory" -type f -name "$png_file_pattern" -delete

33
scripts/setup_dependencies.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
# Upgrade pip
pip install --upgrade pip
# Default to CPU Installation of JAX
jax_mode="jax[cpu]"
# Install JAX
if [ "$1" == "cpu" ]
then
jax_mode="jax[cpu]"
elif [ "$1" == "cuda11" ]
then
jax_mode="jax[cuda11_pip]"
elif [ "$1" == "cuda12" ]
then
jax_mode="jax[cuda12_pip]"
fi
pip install --upgrade "$jax_mode"
# Install Whisper-JAX base
pip install git+https://github.com/sanchit-gandhi/whisper-jax.git
# Update to latest version
pip install --upgrade --no-deps --force-reinstall git+https://github.com/sanchit-gandhi/whisper-jax.git
pip install -r ../requirements.txt
# download spacy models
spacy download en_core_web_sm
spacy download en_core_web_md