Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.13 KB

File metadata and controls

52 lines (32 loc) · 1.13 KB

AI and Machine Learning

Most of this page has moved to: https://www.tomsoderlund.com/ai/ai-introduction

Setting up local Python development environment

Set up Python, Gradio, etc:

# Create and activate a “safe” virtual Python environment (exit with command “deactivate”)
python3 -m venv env && source env/bin/activate

# Create a .gitignore file to exclude the packages in `env` folder
echo "env/" >> .gitignore

# Install Gradio
pip3 install gradio

# Update the list of required packages (do this every time you add packages)
pip3 freeze > requirements.txt

# Create a blank app.py file:
touch app.py

Run

python3 app.py

Deploying on GCP AppEngine

  • Create app.yaml

      gcloud config set project [app-slug]
      gcloud app deploy app.yaml
      gcloud config set project makamap
      gcloud app browse
      pip freeze > requirements.txt
    

Hugging Face

Find Hugging Face models:

find ~/.cache/huggingface/hub -type d | xargs du -chs | grep -v "0B" | grep -v "K	"

Git clone:

GIT_LFS_SKIP_SMUDGE=1 git clone git@hf.co:spaces/blendastudios/gradio-lipsync-wav2lip

Push to git:

ssh-add -l
ssh-add ~/.ssh/id_rsa
git push