This guide walks you through deploying the Smart Sign Interpreter on Render with persistent Google Sheets storage.
- GitHub account with access to the repository
- Render account (free or paid)
- Google account
- This completed: GOOGLE_SHEETS_SETUP.md
Before deployment, ensure you have:
- Google Sheets API and Drive API enabled in Google Cloud Console
- Service account JSON credentials file downloaded
- Google Sheet created and shared with the service account
- Spreadsheet ID copied from the URL
See GOOGLE_SHEETS_SETUP.md for detailed instructions.
-
Commit all changes:
git add . git commit -m "Add Google Sheets integration for persistent data storage"
-
Push to your repository:
git push origin main
-
Go to render.com
-
Sign up or log in
-
Click "New +" → "Web Service"
-
Connect your GitHub account (first time only)
-
Select this repository
-
Fill in the settings:
- Name:
smart-sign-interpreter(or your preferred name) - Environment:
Docker - Region: Choose closest to your location
- Branch:
main - Plan:
Free(or upgrade if needed)
- Name:
-
Click "Create Web Service"
Wait for Render to build and deploy (2-5 minutes).
-
In your Render service dashboard, click "Environment"
-
Click "Add Environment Variable"
-
Add the following variables:
APP_HOST: 0.0.0.0 APP_PORT: 8000 MODEL_PATH: models/gesture_model.pkl DATASET_PATH: data/datasets/gesture_dataset.csv LOG_LEVEL: INFO ALLOW_MISSING_MODEL: true ENABLE_DEMO: true GOOGLE_CREDENTIALS_PATH: [PASTE_COMPLETE_SERVICE_ACCOUNT_JSON_AS_A_SECRET] GOOGLE_SPREADSHEET_ID: [YOUR_SPREADSHEET_ID]Replace
[YOUR_SPREADSHEET_ID]with your actual Google Sheet ID.
For Render free tier, create GOOGLE_CREDENTIALS_PATH as a secret environment
variable and paste the complete contents of the downloaded service-account JSON
file as its value. This does not require uploading a credentials file to Render.
Do not paste the key into the repository, a committed .env file, or a public
support request. If you use a mounted disk on a paid plan, you may instead set
GOOGLE_CREDENTIALS_PATH to the credentials file path.
- Go back to your service dashboard
- Click "Manual Deploy" → "Deploy latest commit"
- Wait for deployment to complete
- Check the logs for:
✓ Google Sheets integration enabled for dataset storage
-
Get your Render URL from the dashboard (e.g.,
https://smart-sign-interpreter.onrender.com) -
Test the health endpoint:
curl https://smart-sign-interpreter.onrender.com/api/health
-
Access the collection tool:
https://smart-sign-interpreter.onrender.com/collect -
Collect a sample gesture and save it
-
Check that data appears in your Google Sheet
In your Render dashboard:
- Click "Logs" tab
- Real-time logs appear below
- Check for errors and Google Sheets connection messages
To manually sync data:
# From your local machine
python scripts/sync_google_sheets.py download \
--credentials /path/to/credentials.json \
--sheet-id YOUR_SHEET_ID \
--csv local_data.csvThe model automatically retrains when you click "RETRAIN" in the data collection tool.
To manually trigger:
curl -X POST https://smart-sign-interpreter.onrender.com/api/model/retrain \
-H "Content-Type: application/json" \
-d '{"model_type": "knn"}'- Free tier: Ephemeral disk only (no persistent data on disk)
- Paid tier: Can add persistent disks
- Google Sheets: Unlimited (within Google account limits)
Free tier:
- 750 hours/month of running services
- Auto-spins down after 15 minutes of inactivity
- Good for development/testing
Paid tier:
- Always-on service
- More reliable
- Check Render pricing
-
Check the logs tab
-
Common issues:
- Missing environment variables
- Invalid Google credentials JSON or an incorrect credentials path
- Port already in use
-
Click "Manual Deploy" to retry
- Verify
GOOGLE_CREDENTIALS_PATHcontains the complete valid JSON or matches the credentials file location. - Verify
GOOGLE_SPREADSHEET_IDis correct. - Check Google Sheets API is enabled.
- Check application logs for errors
- Verify the spreadsheet is shared with the service account
- Try accessing the collection tool and checking
/api/dataset/stats
On Render's free tier, services auto-spin down after 15 minutes of inactivity.
- This is normal
- Your Google Sheets data is safe
- Data restores when you make a request
- Upgrade to paid tier for always-on service
- In your service settings, go to "Custom Domain"
- Enter your domain (e.g.,
gesture.example.com) - Update your domain's DNS records as instructed
If you need better performance:
- Upgrade to a paid plan
- Consider using Render's PostgreSQL for session storage
- Cache model predictions if needed
Render automatically deploys on push to main branch. To disable:
- Go to service settings
- Turn off "Auto-deploy"
| Aspect | Local | Render |
|---|---|---|
| Data persistence | Disk based | Google Sheets |
| Uptime | Only while running | 24/7 (paid) or auto-sleep (free) |
| Performance | Fast local access | Network latency to Google |
| Cost | Free | Free/Paid |
| Model updates | Manual via CLI | Via web interface |
- Set up real glove hardware to send data
- Collect training data over time
- Monitor model accuracy
- Share deployment URL with team
- Consider upgrading to paid plan for production use
- Google Sheets API enabled
- Service account credentials downloaded
- Google Sheet created and shared
- Environment variables configured
- Credentials stored as a Render secret (or uploaded to mounted storage)
- Service deployed successfully
- Test data collection working
- Google Sheets receiving data
- Model retraining works
- Share deployment URL with team