Demos for the talk on Introduction to AI & HuggingFace.
The demos are written in Python and outside of ensuring you have the latest python installed, you can setup a virtual environment and install the dependencies for all demos easily by following the notes below.
For some demos, it's vital that Pytorch or Tensorflow is correctly installed on your machine - based on available hardware.
First we want to create a virtal environment for the dependencies:
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
The next thing is to setup the environment variables with API keys and various other things required for the demos.
$ cp .env.example .env
Then open up the .env
file and fill in the critical ones like:
- HUGGINGFACEHUB_API_TOKEN - API Token for HuggingFace from the HuggingFace API Token page.
- OPENAI_API_KEY - API Key from the OpenAPI API Key page.
You can run the demos in sub-folders from the root (so environment variables & dependencies are shared).
$ python image-to-audio/app.py