Deploy to Hugging Face Spaces
Step 1: Create the Space
- Go to Hugging Face Spaces.
- Click Create new Space.
- Enter a name (e.g.,
sap-finance-dashboard). - Select Gradio as the SDK.
- Choose Public or Private.
- Click Create Space.
Step 2: Push Code
Run these commands in your terminal:
# Add the Hugging Face remote (replace <username> with your HF username)
git remote add hf https://huggingface.co/spaces/<username>/sap-finance-dashboard
# Push the code
git push hf main
Note: You will be asked for your Hugging Face username and password (token).
Step 3: Configure Secrets
- Go to your Space's Settings tab.
- Scroll to Variables and secrets.
- Click New secret.
- Name:
HUGGINGFACE_TOKEN - Value: Your Hugging Face Access Token (from Settings > Access Tokens).
Step 4: Enjoy!
Your app will build and start automatically. You can view the build logs in the Logs tab of your Space.