Create Hugging Face Space - Step by Step
Method: Web Interface (Recommended)
Step 1: Go to Hugging Face Spaces
Visit: https://huggingface.co/spaces
Step 2: Create New Space
- Click "Create new Space" button
- Fill in the form:
- Owner: Your username (will be auto-selected)
- Space name:
token-bazuka - SDK: Select "Flask"
- License: MIT
- Space visibility: Public (recommended)
Step 3: Click "Create Space"
This will create the space and redirect you to the space page.
Step 4: Upload Files
On the space page:
- Click the "Files" tab
- Click "Upload files"
- Upload these files from
/Users/alep/Downloads/02_AI_Agents/hf-token-bazuka/:app.pyrequirements.txtREADME.mdtemplates/folder (withindex.htmlinside)
Step 5: Wait for Build
Hugging Face will automatically:
- Install dependencies from
requirements.txt - Build the Flask app
- Deploy the space
Step 6: Access Your Space
Once built, your space will be available at:
https://huggingface.co/spaces/YOUR_USERNAME/token-bazuka
Step 7: Update .env
Update /Users/alep/Downloads/02_AI_Agents/.env with your actual space URL:
TOKEN_BAZUKA_URL=https://huggingface.co/spaces/YOUR_USERNAME/token-bazuka
Files to Upload
From hf-token-bazuka/ directory:
hf-token-bazuka/
βββ app.py
βββ requirements.txt
βββ README.md
βββ templates/
βββ index.html
Verification
After deployment, you should see:
- Dark-themed Token Bazuka UI
- Deploy Token tab with form
- System Status tab with live metrics
- Deployments tab with history
- About tab with documentation
Troubleshooting
If the build fails:
- Check the "Logs" tab for error messages
- Ensure all files are uploaded correctly
- Verify
requirements.txthas correct dependencies - Check
app.pyhas no syntax errors
Alternative: Git Deployment
If you prefer Git:
# After creating the space via web interface
git clone https://huggingface.co/spaces/YOUR_USERNAME/token-bazuka
cd token-bazuka
cp -r ../hf-token-bazuka/* .
git add .
git commit -m "Deploy Token Bazuka"
git push