DEV Community

Tom
Tom

Posted on

2

🤗 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!

API Trace View

Struggling with slow API calls? 🕒

Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay