Skip to main content

Huggingface deployment for FastHTML

Project description

FastHTML on 🤗 Spaces

Deploy a FastHTML application to HuggingFace Spaces for free with one command!

Quickstart

  1. Create a free account on HuggingFace
  2. Go to your account settings and create an access token with write access. Keep this token safe and don't share it.
  3. Set the HF_TOKEN environment variable to that token
  4. Install fasthtml-hf: pip install fasthtml-hf
  5. Run fh_hf_deploy <space_name>, replacing <space_name> with the name you want to give your space.

By default this will upload a public space. You can make it private with --private true.

Configuration

The space will upload a backup of your database to a HuggingFace Dataset. By default it will be private and its name will be <your-huggingface-id>/space-backup. You can change this behavior in the config.ini file. In not provided, a default file will be created with the contents (note that the [DEFAULT] line is required at the top):

[DEFAULT]
dataset_id = space-backup
db_dir = data
private_backup = True

If you so choose, you can disable the automatic backups and use persistent storage instead for $5/month (USD).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasthtml_hf-0.1.4.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

fasthtml_hf-0.1.4-py3-none-any.whl (12.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page