# Hugging Face Guide

## Getting Tokens for CodeAssist

CodeAssist uses Hugging Face to securely host and share AI models, linking them to your Gensyn Testnet account. Hugging Face ensures models are accessible, auditable, and reusable within the AI ecosystem.

#### Step 1 — Sign Up&#x20;

Go to [Hugging Face](https://huggingface.co/login) and click **Sign Up** in the top right to create a free account.&#x20;

* You can sign up with email/password, or through Google or GitHub
* Already have an account? Click **Sign In.**&#x20;

{% hint style="success" %}
If you have trouble signing up, try a different browser or disable ad blockers.
{% endhint %}

#### Step 3 — Verify your Email (required)

After signing up, check your inbox for a Hugging Face verification email. Then, click the link in the email to verify your address.

This step is required before you can create tokens or upload anything.

{% hint style="warning" %}
Can't find it? Check your spam folder. or log in and click **“Resend Verification”.**
{% endhint %}

#### Step 3 — Generate a New Access Token

This token allows the game to upload a model to your Hugging Face account.

1. Once signed in, click your **profile icon** (top right corner).
2. Select **“Access Tokens”** from the dropdown.
3. Click **“New token”.**
   * **Name:** something like “CodeAssist”.
   * **Role:** choose **Write.**
4. Click **“Create”.**
5. **Copy the token immediately,** as you won’t be able to see it again.

{% hint style="info" %}
When prompted to paste the token, be aware that the token will be **invisible** when pasted, so you won't see it entered into the terminal. Simply paste, then hit `enter` (Windows/Linux) or `return` (macOS).
{% endhint %}

### Common Issues

Here's some common blockers and quick fixes if you encounter any problems regarding Hugging Face:

| Issue                                             | Solution                                                                                                                                                  |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Not seeing "Access Tokens" menu                   | Make sure you’re logged in and your email is verified.                                                                                                    |
| Copied the token, but didn't save it              | Delete the lost token and generate a new one. Be sure to save it!                                                                                         |
| 403 Client Error: Forbidden                       | Your token might not have *Write* permissions, or may have expired. Generate a new token with Write access.                                               |
| Uploaded model doesn't appear on Hugging Face     | Refresh your Hugging Face profile and check under Repositories → Models and confirm you’re logged into the same Hugging Face account that owns the token. |
| Multiple tokens created, not sure which is active | Delete unused tokens in Settings → Access Tokens. Keep only the one you use for CodeAssist to avoid confusion.                                            |

### Using your New Token with CodeAssist

You're ready to go!&#x20;

Paste your token during CodeAssist setup, [which you can read about here](/testnet/blockassist/using-blockassist.md), and start training models and contributing to the Gensyn Testnet.&#x20;

{% hint style="success" %}
If you need additional support, you can [open a ticket](https://github.com/gensyn-ai/codeassist/issues) or [visit our Discord.](https://discord.com/invite/gensyn)&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gensyn.ai/testnet/codeassist/hugging-face-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
