README / README.md
akhaliq's picture
akhaliq HF staff
fix list
bc94905
|
raw
history blame
9.86 kB
metadata
title: README
emoji: 💻
colorFrom: indigo
colorTo: gray
sdk: static
pinned: false

Welcome to the Gradio Blocks Party 🥳


Happy to invite you to the Gradio Blocks Party - a community event in which we will setup spaces for models using the new Gradio Blocks API. Blocks allows you to build web-based demos in a flexible way using the Gradio library. The event will take place from May 11th to 31st. We will be organizing this event on github and the huggingface discord channel.



What is Gradio?


Gradio is a Python library that allows you to quickly build web-based machine learning demos, data science dashboards, or other kinds of web apps, entirely in Python. These web apps can be launched from wherever you use Python (jupyter notebooks, colab notebooks, Python terminal, etc.) and shared with anyone instantly using Gradio's auto-generated share links. To learn more about Gradio see the Getting Started Guide: https://gradio.app/getting_started/


What is Blocks?


gradio.Blocks is a low-level API that allows you to have full control over the data flows and layout of your application. You can build very complex, multi-step applications using Blocks. If you have already used gradio.Interface, you know that you can easily create fully-fledged machine learning demos with just a few lines of code. The Interface API is very convenient but in some cases may not be sufficiently flexible for your needs. For example, you might want to:

  • Group together related demos as multiple tabs in one web app
  • Change the layout of your demo instead of just having all of the inputs on the left and outputs on the right
  • Have multi-step interfaces, in which the output of one model becomes the input to the next model, or have more flexible data flows in general
  • Change a component's properties (for example, the choices in a Dropdown) or its visibilty based on user input

to learn more about Blocks see the guide https://www.gradio.app/introduction_to_blocks/


How Does Gradio and Hugging Face work together?


Hugging Face Spaces is a free hosting option for Gradio demos. Spaces comes with 3 SDK options: Gradio, Streamlit and Static HTML demos. Spaces can be public or private and the workflow is similar to github repos. There are over 2000+ Gradio spaces currently on Hugging Face. Learn more about spaces here: https://huggingface.co/docs/hub/spaces


Event Plan

main components of the event consist of:

  • 1. Learning about Gradio and the new Blocks Feature
  • 2. Building your own Blocks demo using Gradio and Hugging Face Spaces
  • 3. Submitting your demo on Spaces to the Gradio Blocks Party Organization

Example spaces using Blocks


To participate in the event

Participants will have a month to build and share Gradio demos using the Blocks feature. We will share a list of ideas of spaces that can be created using blocks or participants are free to try out their own ideas. At the end of the event, spaces will be evaluated for creativity and prizes will be given


potential ideas for creating spaces:




Prizes


  • Hugging Face PRO subscription 1 month for top 25 winners and 1 year for 1st place winner!
  • Hugging Face PRO subscription badge on Hugging Face for winners
  • Gradio badge for everyone participating!
  • Blocks event badge on HF for all participants!
  • Swag from Hugging Face merch shop: t-shirts, hoodies, mugs of your choice for top 10 winners!
  • Embedding your Gradio Blocks demo in the Gradio Blog for 1st place winner
  • Gradio Team Office Hour for 1st place winner

Prizes Criteria

  • Staff Picks
  • Most liked Spaces
  • Community Pick (voting)
  • Most Creative Space (voting)

Creating a Gradio demo on Hugging Face Spaces

Once a model has been picked from the choices above, you can share a model in a Space using Gradio. Read more about how to add Gradio spaces: https://huggingface.co/blog/gradio-spaces


Steps to add Gradio Spaces to the Gradio Blocks Party org


  • Create a account on Hugging Face
  • Join the Gradio Blocks Party Organization by clicking Join Organization Button in the Org Page
  • Once approved add your space using the Gradio SDK