Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Building Interactive Dashboards with Voilà and Solara

image image

Introduction

Learning Objectives

Installing Voilà and Solara

Introduction to Hugging Face Spaces

Installing the Hugging Face CLI

Logging in to Hugging Face

huggingface-cli login

Creating a Basic Voilà Application

Creating a new Hugging Face Space

Embedding the Hugging Face Space in Your Website

Running the Voilà Application

Exploring the File Structure of the Space

Updating the Hugging Face Space

Updating the Space from the Hugging Face Website

Updating the Space from the Command Line

git clone https://huggingface.co/spaces/YOUR-USERNAME/leafmap-voila
cd leafmap-voila
voila notebooks/
voila notebooks/ --strip_sources=False

Creating an Advanced Web Application with Solara

Understanding Solara

Using a Leafmap Template for Solara

Exploring the File Structure of the Solara Web App

Introduction to Solara Components

Creating a New Page

Running the Solara Web App Locally

cd solara-maplibre
solara run pages/

Pushing Changes to the Hugging Face Space

git add .
git commit -m "Update the web app"
git push

Key Takeaways

Exercises

Exercise 1: Create a Simple Voilà Dashboard

Exercise 2: Build a Multi-Page Solara Application