Most of this page has moved to: https://www.tomsoderlund.com/ai/ai-introduction
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
python3 app.py
-
Create
app.yamlgcloud config set project [app-slug] gcloud app deploy app.yaml gcloud config set project makamap gcloud app browse pip freeze > requirements.txt
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