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
  1. Advanced Topics

How to Add a Space to ArXiv

PreviousCustom Python SpacesNextCookie limitations in Spaces

Last updated 1 year ago

How to Add a Space to ArXiv

Demos on Hugging Face Spaces allow a wide audience to try out state-of-the-art machine learning research without writing any code. to embed these demos directly along side papers on ArXiv!

Thanks to this integration, users can now find the most popular demos for a paper on its arXiv abstract page. For example, if you want to try out demos of the LayoutLM document classification model, you can go to , and navigate to the demo tab. You will see open-source demos built by the machine learning community for this model, which you can try out immediately in your browser:

We’ll cover two different ways to add your Space to ArXiv and have it show up in the Demos tab.

Prerequisites

  • There’s an existing paper on ArXiv that you’d like to create a demo for

  • You have built or (can build) a demo for the model on Spaces

Method 1 (Recommended): Linking from the Space README

And that’s it! Your Space should appear in the Demo tab next to the paper on ArXiv in a few minutes 🤗

Method 2: Linking a Related Model

An alternative approach can be used to link Spaces to papers by linking an intermediate model to the Space. This requires that the paper is associated with a model that is on the Hugging Face Hub (or can be uploaded there)

  1. Note: you can verify this step has been carried out successfully by seeing if an ArXiv button appears above the model card. In the case of LayoutLM, the button says: “arxiv:1912.13318” and links to the LayoutLM paper on ArXiv.

  2. Then, create a demo on Spaces that loads this model. Somewhere within the code, the model name must be included in order for Hugging Face to detect that a Space is associated with it.

    Copied

    from transformers import LayoutLMForTokenClassification
    
    layoutlm_dummy = LayoutLMForTokenClassification.from_pretrained("microsoft/layoutlm-base-uncased", num_labels=1)
  3. As soon as your Space is built, Hugging Face will detect that it is associated with the model. A “Linked Models” button should appear in the top right corner of the Space, as shown here:

Your Space should appear in the Demo tab next to the paper on ArXiv in a few minutes 🤗

The simplest way to add a Space to an ArXiv paper is to include the link to the paper in the Space README file (README.md). It’s good practice to include a full citation as well. You can see an example of a link and a citation on this .

First, upload the model associated with the ArXiv paper onto the Hugging Face Hub if it is not already there. ()

When writing the model card (README.md) for the model, include a link to the ArXiv paper. It’s good practice to include a full citation as well. You can see an example of a link and a citation on the

For example, the Space loads the LayoutLM and include the string "microsoft/layoutlm-base-uncased":

Note: Here’s an and here are more specific instructions for and .

Note: You can also add linked models manually by explicitly updating them in the .

🌍
Echocardiogram Segmentation Space README
Detailed instructions are here
LayoutLM model card
docformer_for_document_classification
like this
overview on building demos on Hugging Face Spaces
Gradio
Streamlit
README metadata for the Space, as described here
Hugging Face and ArXiv have collaborated
the LayoutLM paper’s arXiv page