Spaces:
Sleeping
Sleeping
File size: 2,183 Bytes
90537f3 |
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 91 92 93 |
# π€ Hugging Face Spaces Deployment Guide for Tabble-v3
## π Quick Deployment
### Step 1: Prepare Repository
```bash
git clone https://github.com/your-username/tabble-v3.git
cd tabble-v3
# Verify required files exist:
# β Dockerfile, app.py, requirements.txt
# β templates/, app/, hotels.csv
```
### Step 2: Create Hugging Face Space
1. Go to [https://huggingface.co/new-space](https://huggingface.co/new-space)
2. Configure:
- **Space name**: `tabble-v3-restaurant`
- **SDK**: Docker
- **License**: MIT
3. Connect your GitHub repository
4. Add metadata to README.md:
```yaml
---
title: Tabble-v3 Restaurant Management
emoji: π½οΈ
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
license: mit
tags: [restaurant, management, fastapi, qr-code]
---
```
### Step 3: Monitor Build
- Watch build logs in "Logs" tab
- Wait for "Running on http://0.0.0.0:7860" message
- Verify health check at `/health` endpoint
## π± Using Your App
### Access URLs
- **Home**: `your-space-url/`
- **Customer**: `your-space-url/customer`
- **Chef**: `your-space-url/chef`
- **Admin**: `your-space-url/admin`
- **API Docs**: `your-space-url/docs`
### Demo Credentials
- **Hotel Access Code**: `myhotel`
- **Tables**: 1-20
- **Phone OTP**: Any 6 digits
## π§ Customization
### Add Your Hotel
Edit `hotels.csv`:
```csv
hotel_database,password
your_restaurant.db,secure_password_123
```
### Menu Setup
1. Access admin panel with hotel code
2. Go to "Manage Dishes"
3. Add menu items with images and pricing
## π Troubleshooting
### Common Issues
1. **Build fails**: Check Dockerfile and requirements.txt
2. **App won't start**: Verify port 7860 and database init
3. **Templates missing**: Ensure templates/ directory exists
### Debug Steps
1. Check Space logs for errors
2. Test `/health` endpoint
3. Verify admin panel loads with demo credentials
## π Production Ready
### Security
- Update hotel passwords in `hotels.csv`
- Set `SECRET_KEY` environment variable
### Features
- Upload menu images to `app/static/images/`
- Customize branding in templates
- Configure real SMS/payment services
**Your restaurant management system is now live!** π |