BOINC AI Hub
  • 🌍BOINC AI Hub
  • 🌍Repositories
  • Getting Started with Repositories
  • Repository Settings
  • Pull Requests & Discussions
  • Notifications
  • Collections
  • 🌍Webhooks
    • How-to: Automatic fine-tuning with Auto-Train
    • How-to: Build a Discussion bot based on BLOOM
    • How-to: Create automatic metadata quality reports
  • Repository size recommendations
  • Next Steps
  • Licenses
  • 🌍Models
  • The Model Hub
  • 🌍Model Cards
    • Annotated Model Card
    • Carbon Emissions
    • Model Card Guidebook
    • Landscape Analysis
  • Gated Models
  • Uploading Models
  • Downloading Models
  • 🌍Integrated Libraries
    • Adapter Transformers
    • AllenNLP
    • Asteroid
    • Diffusers
    • ESPnet
    • fastai
    • Flair
    • Keras
    • ML-Agents
    • PaddleNLP
    • RL-Baselines3-Zoo
    • Sample Factory
    • Sentence Transformers
    • spaCy
    • SpanMarker
    • SpeechBrain
    • Stable-Baselines3
    • Stanza
    • TensorBoard
    • timm
    • Transformers
    • Transformers.js
  • 🌍Model Widgets
    • Widget Examples
  • Inference API docs
  • Frequently Asked Questions
  • 🌍Advanced Topics
    • Integrate a library with the Hub
    • Tasks
  • 🌍Datasets
  • Datasets Overview
  • Dataset Cards
  • Gated Datasets
  • Dataset Viewer
  • Using Datasets
  • Adding New Datasets
  • 🌍Spaces
  • 🌍Spaces Overview
    • Handling Spaces Dependencies
    • Spaces Settings
    • Using Spaces for Organization Cards
  • Spaces GPU Upgrades
  • Spaces Persistent Storage
  • Gradio Spaces
  • Streamlit Spaces
  • Static HTML Spaces
  • 🌍Docker Spaces
    • Your first Docker Spaces
    • Example Docker Spaces
    • Argilla on Spaces
    • Label Studio on Spaces
    • Aim on Space
    • Livebook on Spaces
    • Shiny on Spaces
    • ZenML on Spaces
    • Panel on Spaces
    • ChatUI on Spaces
    • Tabby on Spaces
  • Embed your Space
  • Run Spaces with Docker
  • Spaces Configuration Reference
  • Sign-In with BA button
  • Spaces Changelog
  • 🌍Advanced Topics
    • Using OpenCV in Spaces
    • More ways to create Spaces
    • Managing Spaces with Github Actions
    • Custom Python Spaces
    • How to Add a Space to ArXiv
    • Cookie limitations in Spaces
  • 🌍Other
  • 🌍Organizations
    • Managing Organizations
    • Organization Cards
    • Access Control in Organizations
  • Billing
  • 🌍Security
    • User Access Tokens
    • Git over SSH
    • Signing Commits with GPG
    • Single Sign-On (SSO)
    • Malware Scanning
    • Pickle Scanning
    • Secrets Scanning
  • Moderation
  • Paper Pages
  • Search
  • Digital Object Identifier (DOI)
  • Hub API Endpoints
  • Sign-In with BA
Powered by GitBook
On this page
  • 🟧 Label Studio on Spaces
  • ⚡️ Deploy Label Studio on Spaces
  • 🚀 Using the Default Configuration
  • 🛠️ Configuring a Production-Ready Instance of Label Studio
  • 🤗 Next Steps, Feedback, and Support
  1. Docker Spaces

Label Studio on Spaces

PreviousArgilla on SpacesNextAim on Space

Last updated 1 year ago

🟧 Label Studio on Spaces

is an for labeling, annotating, and exploring many different data types. Additionally, Label Studio includes a powerful that can be used for new model training, active learning, supervised learning, and many other training techniques.

This guide will teach you how to deploy Label Studio for data labeling and annotation within the Hugging Face Hub. You can use the default configuration of Label Studio as a self-contained application hosted completely on the Hub using Docker for demonstration and evaluation purposes, or you can attach your own database and cloud storage to host a fully-featured production-ready application hosted on Spaces.

⚡️ Deploy Label Studio on Spaces

You can deploy Label Studio on Spaces with just a few clicks:

Spaces requires you to define:

  • An Owner: either your personal account or an organization you’re a part of.

  • A Space name: the name of the Space within the account you’re creating the Space.

  • The Visibility: private if you want the Space to be visible only to you or your organization, or public if you want it to be visible to other users or applications using the Label Studio API (suggested).

🚀 Using the Default Configuration

By default, Label Studio is installed in Spaces with a configuration that uses local storage for the application database to store configuration, account credentials, and project information. Labeling tasks and data items are also held in local storage.

Storage in Hugging Face Spaces is ephemeral, and the data you store in the default configuration can be lost in a reboot or reset of the Space. Because of this, we strongly encourage you to use the default configuration only for testing and demonstration purposes.

After launching Label Studio, you will be presented with the standard login screen. You can start by creating a new account using your email address and logging in with your new credentials. Periodically after logging in, Label Studio will warn you that the storage is ephemeral and data could be lost if your Space is restarted. You will also be preset with a prompt from Heidi, the helpful Label Studio mascot, to create a new project to start labeling your data. To get started, check out the Label Studio with a guide on how to build an annotation interface for sentiment analysis.

🛠️ Configuring a Production-Ready Instance of Label Studio

To make your Space production-ready, you will need to make three configuration changes:

  • Disable the unrestricted creation of new accounts.

  • Enable persistence by attaching an external database.

  • Attach cloud storage for labeling tasks.

Disable Unrestricted Creation of New Accounts

  • LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK: Setting this value to true will disable unrestricted account creation.

  • LABEL_STUDIO_USERNAME: This is the username of the account that you will use as the first user in your Label Studio Space. It should be a valid email address.

  • LABEL_STUDIO_PASSWORD: The password that will be associated with the first user account.

Restart the Space to apply these settings. The ability to create new accounts from the login screen will be disabled. To create new accounts, you will need to invite new users in the Organization settings in the Label Studio application.

Enable Configuration Persistence

Set the following secret variables to match your own hosted instance of Postgres. We strongly recommend setting these as secrets to prevent leaking information about your database service to the public in your spaces definition.

  • DJANGO_DB: Set this to default.

  • POSTGRE_NAME: Set this to the name of the Postgres database.

  • POSTGRE_USER: Set this to the Postgres username.

  • POSTGRE_PASSWORD: Set this to the password for your Postgres user.

  • POSTGRE_HOST: Set this to the host that your Postgres database is running on.

  • POSTGRE_PORT: Set this to the port that your Pogtgres database is running on.

  • STORAGE_PERSISTENCE: Set this to 1 to remove the warning about ephemeral storage.

Restart the Space to apply these settings. Information about users, projects, and annotations will be stored in the database, and will be reloaded by Label Studio if the space is restarted or reset.

Enable Cloud Storage

Amazon S3

  • STORAGE_TYPE: Set this to s3.

  • STORAGE_AWS_ACCESS_KEY_ID: <YOUR_ACCESS_KEY_ID>

  • STORAGE_AWS_SECRET_ACCESS_KEY: <YOUR_SECRET_ACCESS_KEY>

  • STORAGE_AWS_BUCKET_NAME: <YOUR_BUCKET_NAME>

  • STORAGE_AWS_REGION_NAME: <YOUR_BUCKET_REGION>

  • STORAGE_AWS_FOLDER: Set this to an empty string.

Google Cloud Storage

  • STORAGE_TYPE: Set this to gcs.

  • STORAGE_GCS_BUCKET_NAME: <YOUR_BUCKET_NAME>

  • STORAGE_GCS_PROJECT_ID: <YOUR_PROJECT_ID>

  • STORAGE_GCS_FOLDER: Set this to an empty string.

  • GOOGLE_APPLICATION_CREDENTIALS: Set this to /opt/heartex/secrets/key.json.

Azure Blob Storage

  • STORAGE_TYPE: Set this to azure.

  • STORAGE_AZURE_ACCOUNT_NAME: <YOUR_STORAGE_ACCOUNT>

  • STORAGE_AZURE_ACCOUNT_KEY: <YOUR_STORAGE_KEY>

  • STORAGE_AZURE_CONTAINER_NAME: <YOUR_CONTAINER_NAME>

  • STORAGE_AZURE_FOLDER: Set this to an empty string.

🤗 Next Steps, Feedback, and Support

The default configuration on Label Studio allows for the unrestricted creation of new accounts for anyone who has the URL for your application. You can by adding the following configuration secrets to your Space Settings.

By default, this Space stores all project configuration and data annotations in local storage with SQLite. If the Space is reset, all configuration and annotation data in the Space will be lost. You can enable configuration persistence by , guaranteeing that all project and annotation settings are preserved.

By default, the only data storage enabled for this Space is local. In the case of a Space reset, all data will be lost. To enable permanent storage, you must enable a . Choose the appropriate cloud connector and configure the secrets for it.

To get started with Label Studio, check out the Label Studio , which walks you through an example sentiment analysis annotation project. You can find a full set of resources about Label Studio and the Label Studio community on at the . This includes , an for trying out different annotation interfaces, and links to join the .

🌍
restrict signups
connecting an external Postgres database to your space
cloud storage connector
“Zero to One” tutorial
Label Studio Home Page
full documentation
interactive playground
Label Studio Slack Community
Label Studio
open-source data labeling platform
machine learning interface
“Zero to One” tutorial