Ready to contribute to the AI community? Sharing your work on Hugging Face helps others learn and gives you useful feedback. Whether you’ve created a cool demo, fine-tuned a model, or collected a useful dataset, the community wants to see what you’ve built!
Sharing your work helps others learn, gives you feedback to improve, and builds your reputation in the AI community. Plus, it’s easier than you might think.
There are three main ways to share your AI work on Hugging Face:
Models - Share trained or fine-tuned models that others can use directly or build upon
Datasets - Upload datasets you’ve collected, cleaned, or created for others to use in their projects
Spaces - Create interactive demos that let people try your AI applications in their browser
Spaces are a visible way to share your work. Interactive demos are useful for portfolios and feedback.
Spaces are the easiest and most visible way to share your AI work. Here’s how to create one:
1. Choose Your Framework
2. Create Your Space
index.html with <h1>Hello World</h1>)3. Make It Great
You can share small datasets too — they don’t need to be large LLM training corpora.
Uploading Datasets:
Documentation tips:
The easiest way to get started is to duplicate a community space. This is handy if you want to use your own credits, do some private testing, or just customize the space to your liking.
my-duplicate-spaceFor example, why not duplicate this transcription space from Nvidia and use it to transcribe your own audio files?
Let’s put your knowledge into practice! We’ll create a simple Gradio Space that visualizes data from a Hugging Face dataset. This exercise will teach you the basics of Spaces while creating something useful.
A data explorer that lets users:
my-data-explorerReplace the contents of app.py with this code:
import gradio as gr
import pandas as pd
# Sample dataset - in a real app, you'd load from Hugging Face datasets
data = {
'Country': ['USA', 'China', 'India', 'Germany', 'Japan', 'Brazil'],
'Population': [331, 1439, 1380, 83, 125, 213],
'GDP': [21.43, 14.34, 3.17, 3.84, 4.94, 1.61],
'Area': [9.8, 9.6, 3.3, 0.36, 0.38, 8.5]
}
df = pd.DataFrame(data)
def explore_data(country, show_chart):
"""Function to filter and display data based on user selection"""
if country == "All":
filtered_df = df
title = "All Countries Data"
else:
filtered_df = df[df['Country'] == country]
title = f"Data for {country}"
# Create a simple text summary
summary = f"Showing data for {len(filtered_df)} country(ies)"
if show_chart and len(filtered_df) > 1:
# Create a simple bar chart using Gradio's built-in plotting
chart_data = filtered_df[['Country', 'Population']].values.tolist()
return filtered_df, summary, chart_data
else:
return filtered_df, summary, None
# Create the Gradio interface
with gr.Blocks(title="Data Explorer") as demo:
gr.Markdown("# 📊 Country Data Explorer")
gr.Markdown("Explore population and economic data for different countries!")
with gr.Row():
with gr.Column():
country_dropdown = gr.Dropdown(
choices=["All"] + df['Country'].tolist(),
value="All",
label="Select Country",
info="Choose a country to explore its data"
)
show_chart = gr.Checkbox(
label="Show Population Chart",
value=True,
info="Display a chart when viewing multiple countries"
)
explore_btn = gr.Button("Explore Data", variant="primary")
with gr.Column():
summary_text = gr.Textbox(
label="Summary",
interactive=False
)
with gr.Row():
data_table = gr.Dataframe(
value=df,
label="Country Data",
interactive=False
)
with gr.Row():
chart_plot = gr.BarPlot(
x="Country",
y="Population",
title="Population by Country (Millions)",
label="Population Chart",
visible=True
)
# Set up the interaction
explore_btn.click(
fn=explore_data,
inputs=[country_dropdown, show_chart],
outputs=[data_table, summary_text, chart_plot]
)
# Also trigger on dropdown change
country_dropdown.change(
fn=explore_data,
inputs=[country_dropdown, show_chart],
outputs=[data_table, summary_text, chart_plot]
)
# Launch the app
if __name__ == "__main__":
demo.launch()Create a requirements.txt file with:
gradio
pandas# Country Data Explorer
A simple Gradio app that lets you explore country statistics including population, GDP, and area data.
## Features
- Filter data by country
- View data in table format
- Visualize population with charts
Built as part of the Hugging Face 101 course!Once your basic Space is working, try these improvements:
Once your Space is working, promoting it helps you get feedback and connect with the community. Share the link in the Hugging Face Discord to get immediate feedback from experienced developers. Post about it on social media with #HuggingFace to reach a broader audience. Add it to your portfolio or resume as a concrete demonstration of your AI skills.
Connecting with others in the community enhances your learning and opens collaboration opportunities. Browse other data visualization Spaces for inspiration and to understand different approaches to similar problems. Comment on Spaces you find interesting - creators appreciate feedback and it often leads to interesting conversations.
Understanding how your Space performs helps you improve and learn what works. Monitor how many people have tried your Space using the analytics available in your Space settings. Pay attention to the feedback you’re getting in comments and discussions. Notice whether people are finding it useful for exploring data or if they’re using it in ways you didn’t expect.
Ready to build more advanced applications? In the next chapters, we’ll explore how to combine multiple AI models, work with APIs, and create more sophisticated demos. The foundation you’ve built here will serve you well as we move into more complex territory.
< > Update on GitHub