--- title: README emoji: ๐ฅ colorFrom: green colorTo: blue sdk: static pinned: false ---
This organization invites participants to add gradio demos/models/datasets for conference papers on huggingface (Note: This is not a official ICML sponsored event)
ICML organization is accepting Gradio demo submissions for ICML 2022 papers from anyone for a chance to win prizes from Hugging Face, see prizes section and the leaderboard below. The deadline to submit demos is July 31st, 2022 (AOE Time Zone). For all partipants, feel free to submit Gradio demos for any ICML paper for a chance to win prizes, you can submit demos for multiple papers. Find tutorial on getting started with Gradio on Hugging Face here and to get started with the new Gradio Blocks API here
ICML organization is accepting models submissions for ICML 2022 papers from anyone for a chance to win prizes from Hugging Face, see prizes section and the leaderboard below. The deadline to submit demos is July 31st, 2022 (AOE Time Zone). For all partipants, feel free to submit models for any ICML paper for a chance to win prizes, you can submit models for multiple papers. Find tutorial on getting started with repos on Hugging Face here and to get started with adding models here
ICML organization is accepting dataset submissions for ICML 2022 papers from anyone for a chance to win prizes from Hugging Face, see prizes section and the leaderboard below. The deadline to submit demos is July 31st, 2022 (AOE Time Zone). For all partipants, feel free to submit datasets for any ICML paper for a chance to win prizes, you can submit datasets for multiple papers. Find tutorial on getting started with repos on Hugging Face here and to get started with adding datasets here
See the ICML Spaces Leaderboard
See the ICML Models Leaderboard
See the ICML Datasets Leaderboard
In this tutorial, we will demonstrate how to showcase your demo with an easy to use web interface using the Gradio Python library and host it on Hugging Face Spaces so that conference attendees can easily find and try out your demos. Also, see https://gradio.app/introduction_to_blocks/, for a more flexible way to build Gradio Demos
The first step is to create a web demo from your model. As an example, we will be creating a demo from an image classification model (called model) which we will be uploading to Spaces. The full code for steps 1-4 can be found in this colab notebook.
All you need to do is to run this in the terminal: pip install gradio
Hereโs we define our image classification model prediction function in PyTorch (any framework, like TensorFlow, scikit-learn, JAX, or a plain Python will work as well):
def predict(inp):
inp = Image.fromarray(inp.astype('uint8'), 'RGB')
inp = transforms.ToTensor()(inp).unsqueeze(0)
with torch.no_grad():
prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
return {labels[i]: float(prediction[i]) for i in range(1000)}
For the image classification model from Step 2, it would like like this:
inputs = gr.inputs.Image()
outputs = gr.outputs.Label(num_top_classes=3)
io = gr.Interface(fn=predict, inputs=inputs, outputs=outputs)
If you need help creating a Gradio Interface for your model, check out the Gradio Getting Started guide.
io.launch()
You should see a web interface like the following where you can drag and drop your data points and see the predictions: