Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Final HFOrganization

Placeholder content - original file not found in upstream repository.

5.2 Joining the OceanCV Hugging Face Organization and Uploading Models

This section will guide you through the process of joining the OceanCV Hugging Face organization and uploading your trained models, datasets, or demos.

Joining the OceanCV Organization

  1. Request an Invitation:

    • Send a request to join the OceanCV organization on Hugging Face. You can do this by contacting the organization administrators through the Hugging Face website or via email.

  2. Accept the Invitation:

    • Once you receive an invitation, accept it to become a member of the OceanCV organization.

Uploading Files to Hugging Face

There are two primary methods for uploading files to Hugging Face: via the website and via the command-line interface (CLI).

Method 1: Uploading via the Hugging Face Website

  1. Log in to Your Hugging Face Account:

  2. Navigate to Your Organization:

    • Go to the OceanCV organization page.

  3. Create a New Repository:

    • Click on “New Repository.”

  4. Configure the Repository:

    • Repository Name: Choose a descriptive name for your repository.

    • Visibility: Decide whether the repository should be public or private.

    • Repository Type: Model, Dataset, or Space (Demo).

    • Add a model card

  5. Upload Files:

    • Drag and drop your files into the repository or use the “Add file” button to upload them.

  6. Commit Changes:

    • Write a commit message describing the changes and click “Commit changes.”

Method 2: Uploading via the Hugging Face CLI

  1. Install Hugging Face Transformers and associated libraries:

    pip install transformers huggingface_hub
  2. Authenticate:

    • Log in to your Hugging Face account via the CLI using the following command:

    huggingface-cli login
    • You will be prompted to enter your Hugging Face token, which can be found in your account settings on the Hugging Face website.

  3. Initialize a Git Repository (if not already):

    git init
    git lfs install
  4. Track Large Files (if necessary):

    • If you are uploading large files (e.g., model weights), track them using Git LFS:

    git lfs track "*.pt" "*.bin" # example file types
  5. Add Files:

    git add .
  6. Commit Changes:

    git commit -m "Add initial model files"
  7. Create Repository on Hugging Face:

    • If you haven’t already, create an empty repository on the Hugging Face website.

  8. Link Local Repository to Remote Repository:

    huggingface-cli create-repo your-repo-name --organization OceanCV --type model
    git remote add origin https://huggingface.co/OceanCV/your-repo-name
  9. Push Files to Hugging Face:

    git push origin main

Best Practices for Uploading

By following these steps, you can effectively join the OceanCV Hugging Face organization and upload your models, datasets, or demos for the community to use.