Giter VIP home page Giter VIP logo

huggingface-sync-action's Introduction

huggingface-sync-action

A GitHub action that'll sync files from a GitHub repo with the Hugging Face Hub. ๐Ÿค—

A simple example repo using this can be found here.

Usage

The first step is to add a Hugging Face token with write access to your repo as a GitHub Secret. Below, mine is called HF_TOKEN. Then, you can use this action in your repo as shown below. ๐Ÿค—

uses: nateraw/[email protected]
with:
  # The github repo you are syncing from. Required.
  github_repo_id: ''

  # The Hugging Face repo id you want to sync to. (ex. 'username/reponame')
  # A repo with this name will be created if it doesn't exist. Required.
  huggingface_repo_id: ''

  # Hugging Face token with write access. Required.
  # Here, we provide a token that we called `HF_TOKEN` when we added the secret to our GitHub repo.
  hf_token: ${{ secrets.HF_TOKEN }}

  # The type of repo you are syncing to: model, dataset, or space.
  # Defaults to space.
  repo_type: 'space'

  # If true and the Hugging Face repo doesn't already exist, it will be created
  # as a private repo.
  #
  # Note: this param has no effect if the repo already exists.
  private: false

  # If repo type is space, specify a space_sdk. One of: streamlit, gradio, or static
  #
  # This option is especially important if the repo has not been created yet.
  # It won't really be used if the repo already exists.
  space_sdk: 'gradio'

  # If provided, subdirectory will determine which directory of the repo will be synced.
  # By default, this action syncs the entire GitHub repo.
  #
  # An example using this option can be seen here:
  # https://github.com/huggingface/fuego/blob/830ed98/.github/workflows/sync-with-huggingface.yml
  subdirectory: ''

  # The branch of the github repo you are syncing from.
  # By default, this action syncs the 'main' branch.
  branch: 'main'

huggingface-sync-action's People

Contributors

nateraw avatar juhoinkinen avatar wauplin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.