---
title: "Hosting your Models and Datasets on Hugging Face Spaces using Streamlit"
description: "Streamlit apps can showcase Hugging Face models and datasets and be hosted on Hugging Face Spaces."
url: "https://swe.quest/articles/hosting-your-models-and-datasets-on-hugging-face-spaces-using-streamlit-a8983f0b0bfbdd51"
canonical: "https://huggingface.co/blog/streamlit-spaces"
source: "Hugging Face"
published: "2021-10-05"
difficulty: "medium"
kind: "How-to"
reading_minutes: 3
tags: ["python","machine-learning","deployment"]
---

# Hosting your Models and Datasets on Hugging Face Spaces using Streamlit

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2021-10-05, 3 min read, How-to. Original: [https://huggingface.co/blog/streamlit-spaces](https://huggingface.co/blog/streamlit-spaces)

## Summary

Streamlit apps can showcase Hugging Face models and datasets and be hosted on Hugging Face Spaces. The walkthrough recreates "Write with Transformer" using Streamlit widgets such as text\_area, sidebar sliders and number\_input to collect generation hyperparameters like temperature, top-k and top-p. It then visualizes a poetry dataset, loaded with 🤗 Datasets streaming, using st.dataframe, st.bar\_chart and st.pyplot for seaborn/matplotlib plots. Deployment means dragging files into a Space, listing dependencies in requirements.txt, and matching the Streamlit version.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Python](https://swe.quest/tags/python.md) (Languages)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)

## Prerequisites

- Python basics ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- pandas DataFrames

## Keywords

Streamlit, Hugging Face Spaces, Hugging Face Datasets, GPT-2, XLNet, Write with Transformer

## Related posts

- [Showcase Your Projects in Spaces using Gradio](https://swe.quest/articles/showcase-your-projects-in-spaces-using-gradio-939ccccc3ad428cf.md): Hugging Face · 2021-10-05 · Medium · 3 min read · Machine learning, Python, Inference & serving
  Gradio's Hugging Face Hub integration lets you build an ML demo from a Hub model ID in a few lines: gr.Interface.load plus a title, description and example inputs, backed by the Inference API.
- [Interactively explore your Huggingface dataset with one line of code](https://swe.quest/articles/interactively-explore-your-huggingface-dataset-with-one-line-of-code-be90cdc319132a31.md): Hugging Face · 2023-10-25 · Medium · 5 min read · Machine learning, Python, Developer tools, Computer vision
  Renumics Spotlight builds interactive visualizations directly on top of Hugging Face datasets, inferring data types and label mappings so a single spotlight.show(ds) call opens an inspection UI.
- [Deploy Hugging Face models easily with Amazon SageMaker](https://swe.quest/articles/deploy-hugging-face-models-easily-with-amazon-sagemaker-e09e9e34ef94ffa8.md): Hugging Face · 2021-07-08 · Medium · 9 min read · Inference & serving, Cloud platforms, ML platforms, Python
  Hugging Face Inference Deep Learning Containers and the SageMaker Hugging Face Inference Toolkit let Transformers models be deployed as SageMaker endpoints with a few lines of Python, using transformers pipelines for zero-code pre- and post-processing.
- [Hugging Face x LangChain : A new partner package](https://swe.quest/articles/hugging-face-x-langchain-a-new-partner-package-4a05b92542fbd2d8.md): Hugging Face · 2024-05-14 · Medium · 4 min read · LLMs, Python, Inference & serving, RAG & retrieval
  langchain-huggingface is a new Python partner package jointly maintained by Hugging Face and LangChain, replacing community-written integrations that had drifted out of date.
- [The 5 Most Under-Rated Tools on Hugging Face](https://swe.quest/articles/the-5-most-under-rated-tools-on-hugging-face-d4091b1b4c6dbb61.md): Hugging Face · 2024-08-22 · Medium · 16 min read · ML platforms, Search, Data pipelines, Python
  Five overlooked Hugging Face Hub features (ZeroGPU, multi-process Docker Spaces, the Gradio API client, Hub webhooks and Nomic Atlas) can be combined into a free, automatically updating semantic search pipeline, demonstrated over a subreddit data source.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
