Close Menu
techwavedispatch.com

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Summer at Hugging Face

    November 16, 2026

    How To Clear The Application Cache On Your Mac

    November 16, 2026

    Hosting your Models and Datasets on Hugging Face Spaces using Streamlit

    November 16, 2026
    Facebook X (Twitter) Instagram
    Trending
    • Summer at Hugging Face
    • How To Clear The Application Cache On Your Mac
    • Hosting your Models and Datasets on Hugging Face Spaces using Streamlit
    • Showcase Your Projects in Spaces using Gradio
    • The Oldest Gadget In Your House Could Be Your Home Network’s Biggest Security Hole
    • Fine tuning CLIP with Remote Sensing (Satellite) images and captions
    • The Pros And Cons Of Using Your Phone As A Mobile Hotspot
    • The Age of Machine Learning As Code Has Arrived
    Facebook X (Twitter) Instagram
    techwavedispatch.com
    Subscribe
    Monday, November 16
    • Home
    • AI Tools & Software
    • Machine Learning
    • Generative AI
    • Robotics & Automation
    • Future Tech & Hardware
    • AI in Business
    • Ethics & Regulations
    • More
      • Gadgets & Smart Devices
      • Cybersecurity & AI
      • Tech Breakthroughs
    techwavedispatch.com
    Home»AI Tools & Software»Hosting your Models and Datasets on Hugging Face Spaces using Streamlit
    AI Tools & Software

    Hosting your Models and Datasets on Hugging Face Spaces using Streamlit

    adminBy adminNovember 16, 2026No Comments4 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Hosting your Models and Datasets on Hugging Face Spaces using Streamlit
    Share
    Facebook Twitter LinkedIn Pinterest Email



    Showcase your Datasets and Models using Streamlit on Hugging Face Spaces

    Streamlit allows you to visualize datasets and build demos of Machine Learning models in a neat way. In this blog post we will walk you through hosting models and datasets and serving your Streamlit applications in Hugging Face Spaces.



    Building demos for your models

    You can load any Hugging Face model and build cool UIs using Streamlit. In this particular example we will recreate “Write with Transformer” together. It’s an application that lets you write anything using transformers like GPT-2 and XLNet.

    write-with-transformers

    We will not dive deep into how the inference works. You only need to know that you need to specify some hyperparameter values for this particular application. Streamlit provides many components for you to easily implement custom applications. We will use some of them to receive necessary hyperparameters inside the inference code.

    • The .text_area component creates a nice area to input sentences to be completed.
    • The Streamlit .sidebar method enables you to accept variables in a sidebar.
    • The slider is used to take continuous values. Don’t forget to give slider a step, otherwise it will treat the values as integers.
    • You can let the end-user input integer vaues with number_input .
    import streamlit as st
    
    
    default_value = "See how a modern neural network auto-completes your text 🤗 This site, built by the    Hugging Face team, lets you write a whole document directly from your browser, and you can trigger the Transformer anywhere using the Tab key. Its like having a smart machine that completes your thoughts 😀 Get started by typing a custom snippet, check out the repository, or try one of the examples. Have fun!"
    
    sent = st.text_area("Text", default_value, height = 275)
    max_length = st.sidebar.slider("Max Length", min_value = 10, max_value=30)
    temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
    top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)
    top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05, value = 0.9)
    num_return_sequences = st.sidebar.number_input('Number of Return Sequences', min_value=1, max_value=5, value=1, step=1)
    

    The inference code returns the generated output, you can print the output using simple st.write.
    st.write(generated_sequences[-1])

    Here’s what our replicated version looks like.
    streamlit-rep

    You can checkout the full code here.



    Showcase your Datasets and Data Visualizations

    Streamlit provides many components to help you visualize datasets. It works seamlessly with 🤗 Datasets, pandas, and visualization libraries such as matplotlib, seaborn and bokeh.

    Let’s start by loading a dataset. A new feature in Datasets, called streaming, allows you to work immediately with very large datasets, eliminating the need to download all of the examples and load them into memory.

    from datasets import load_dataset
    import streamlit as st
    
    dataset = load_dataset("merve/poetry", streaming=True)
    df = pd.DataFrame.from_dict(dataset["train"])
    

    If you have structured data like mine, you can simply use st.dataframe(df) to show your dataset. There are many Streamlit components to plot data interactively. One such component is st.barchart() , which I used to visualize the most used words in the poem contents.

    st.write("Most appearing words including stopwords")
    st.bar_chart(words[0:50])
    

    If you’d like to use libraries like matplotlib, seaborn or bokeh, all you have to do is to put st.pyplot() at the end of your plotting script.

    st.write("Number of poems for each author")
    sns.catplot(x="author", data=df, kind="count", aspect = 4)
    plt.xticks(rotation=90)
    st.pyplot()
    

    You can see the interactive bar chart, dataframe component and hosted matplotlib and seaborn visualizations below. You can check out the code here.

    spaces-streamlit-dataset-demo



    Hosting your Projects in Hugging Face Spaces

    You can simply drag and drop your files as shown below. Note that you need to include your additional dependencies in the requirements.txt. Also note that the version of Streamlit you have on your local is the same. For seamless usage, refer to Spaces API reference.

    spaces-streamlit

    There are so many components and packages you can use to demonstrate your models, datasets, and visualizations. You can get started here.

    datasets Face Hosting Hugging Models Spaces Streamlit
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    admin
    • Website

    Related Posts

    Summer at Hugging Face

    November 16, 2026

    Showcase Your Projects in Spaces using Gradio

    November 16, 2026

    Fine tuning CLIP with Remote Sensing (Satellite) images and captions

    November 16, 2026
    Leave A Reply Cancel Reply

    Top Posts

    NVIDIA Is Investigating Reports That CEO Jensen Huang Was The Target Of Chinese Spy Efforts

    November 8, 202619 Views

    ADIndex: Layer-Adaptive Sparse Attention Indexing via Group-Level Distillation

    November 11, 20265 Views

    Anthropic releases new Mythos and Fable models amid RSI concerns

    November 9, 20265 Views

    One Policy for 100 Household Tasks: Our Solution for the 2026 BEHAVIOR Challenge

    November 11, 20264 Views
    Don't Miss
    AI Tools & Software

    Summer at Hugging Face

    By adminNovember 16, 20260

    Summer is now officially over and these last few months have been quite busy at…

    How To Clear The Application Cache On Your Mac

    November 16, 2026

    Hosting your Models and Datasets on Hugging Face Spaces using Streamlit

    November 16, 2026

    Showcase Your Projects in Spaces using Gradio

    November 16, 2026
    About Us

    Welcome to TechWave Dispatch

    At TechWave Dispatch, we bring you the latest news, insights, and developments from the ever-evolving world of technology. Our mission is to keep readers informed about the innovations shaping our digital future.

    From artificial intelligence and machine learning to cybersecurity, robotics, smart devices, and groundbreaking technologies, we cover the topics that matter in today's fast-moving tech landscape.

    Our Picks

    Summer at Hugging Face

    November 16, 2026

    How To Clear The Application Cache On Your Mac

    November 16, 2026

    Hosting your Models and Datasets on Hugging Face Spaces using Streamlit

    November 16, 2026
    Most Popular

    After blocking Muse, Amazon now lets users text Alexa to help them shop

    November 6, 20260 Views

    A controlled world for robot learning and evaluation

    November 6, 20260 Views

    Perplexity now has its own always-on AI agent

    November 6, 20260 Views
    Facebook X (Twitter) Instagram Pinterest
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • About Us
    © 2026 TechWave Dispatch. All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.