Hugging Face in your spreadsheet?
Because spreadsheets can be incredibly useful for journalists, this project connects Hugging Face Inference API with Google Sheets. Handy for prompting, extraction, classification, translation, etc.
You will need to create a script in Google Sheets (Extensions > Apps Script).
Replace the existing code with this script and save it.
Back in the Sheet, you should see a new tab called "Hugging Sheets".
Click on it and add your API key.
VoilĂ !
Note: To generate your API key, click on the Access Token tab in your Hugging Face settings.
Tested with llama 8b and 70b, and mixtral, e.g.:
=HF(cell or prompt, "meta-llama/Meta-Llama-3-70B-Instruct")
=HF(cell or prompt, "meta-llama/Meta-Llama-3-8B-Instruct")
=HF(cell or prompt, "mistralai/Mixtral-8x7B-Instruct-v0.3")
This blog post gives a good overview of the supported models.