huggingface-on-sheets / index.html
fdaudens's picture
fdaudens HF staff
Update index.html
ea14971 verified
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Hugging Face Sheets add-on</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="card">
<h1>Hugging Face Sheets add-on</h1>
<p>Hugging Face in your spreadsheet?</p>
<p>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.</p>
<img src="demo.gif" width="100%">
<h3>Steps</h3>
<ol>
<li><p>Create a script in Google Sheets (Extensions &gt; Apps Script).</p></li>
<li><p>Replace the existing code with <a href="code.gs" target="_blank">this script</a> and save it.</p></li>
<li><p>Back in the Sheet, you should see a new tab called "Hugging Sheets".</p></li>
<li><p>Click on it and add your API key.</p></li>
<li><p>Voilà!</p></li>
</ol>
<p><strong>Note:</strong> To generate your API key, click on the <a href="https://huggingface.co/settings/tokens">Access Token tab in your Hugging Face settings</a>.</p>
<p>Tested with Llama 8B and 70B, and Mistral, e.g.:</p>
<ul>
<li><code>=HF(cell or direct input, "meta-llama/Meta-Llama-3-70B-Instruct", prompt)</code></li>
<li><code>=HF(cell or direct input, "meta-llama/Meta-Llama-3-8B-Instruct", prompt)</code></li>
<li><code>=HF(cell or direct input, "mistralai/Mistral-7B-Instruct-v0.3", prompt)</code></li>
</ul>
<p><strong>Update:</strong> Thanks to <a href="https://huggingface.co/louisbrulenaudet" target="_blank">@louisbrulenaudet</a>, you can now customize your prompt and select the model of your choice directly in the sheet.</p>
<p>The formula is:</p>
<li><code>=HF(cell or direct input, cell with the name of the model, cell with the prompt)</code></li>
<p>This <a href="https://huggingface.co/blog/inference-pro#supported-models">blog post</a> gives a good overview of the supported models.</p>
</div>
</body>
</html>