DEV Community

Tom
Tom

Posted on

πŸ€— How to create spaces in Hugging Face?πŸ€—

Steps to Create a New Space in Hugging Face

  1. On your profile picture, click 'New Space.'

    Image description

  2. Configure your space:

    a. Choose a space name that reflects your model/usage.

    b. Choose Gradio as the space SDK and select the 'Blank' template.

    c. Leave other options as default.

    Image description

  3. There are two ways to edit your Hugging Face application:

    a. If you want to use a local IDE (e.g., VSCode), you can use git to clone and push your changes to Hugging Face.

    Image description

    b. If not, you can click 'create the app.py' to directly edit in the browser.

    Image description

  4. Use any model you'd like and develop the Gradio interface. When you're happy with the interface, you can click 'Commit new file to main.' (It's important to leave the main file as 'app.py').

    Image description

  5. Then you will need to create a 'requirements.txt' file to install the required packages.

    Click on 'Add file,' then 'Create a new file.'

    Image description

  6. Rename the file as 'requirements.txt', insert any packages you need, and then click on 'Commit new file to main'.
    Image description

Voila, your space should start building and you'd be able to use and share it!

Top comments (0)