File size: 2,187 Bytes
617b59c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# 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
1. Click "Create new Space" button
2. 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:
1. Click the "Files" tab
2. Click "Upload files"
3. Upload these files from `/Users/alep/Downloads/02_AI_Agents/hf-token-bazuka/`:
   - `app.py`
   - `requirements.txt`
   - `README.md`
   - `templates/` folder (with `index.html` inside)

### 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:
1. Check the "Logs" tab for error messages
2. Ensure all files are uploaded correctly
3. Verify `requirements.txt` has correct dependencies
4. Check `app.py` has no syntax errors

## Alternative: Git Deployment

If you prefer Git:

```bash
# 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
```