File size: 1,485 Bytes
316c6ac |
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 |
# Deploying on Hugging Face Spaces
This document provides instructions for deploying this Flask application on Hugging Face Spaces.
## Deployment Steps
1. Create a new Space on Hugging Face:
- Go to https://huggingface.co/spaces
- Click "Create new Space"
- Choose "Docker" as the Space SDK
- Fill in the required details (name, visibility, etc.)
2. Upload your code:
- You can use Git to push your code to the Space repository
- Make sure to include all necessary files (app.py, requirements.txt, Dockerfile, etc.)
3. The Space will automatically build and deploy your application using the provided Dockerfile.
## Important Notes
- The application is configured to run on port 7860, which is the default port for Hugging Face Spaces
- Make sure your .env file is properly configured with any required API keys
- The uploads directory is created automatically during the Docker build process
- The application uses gunicorn as the WSGI server for production deployment
## Environment Variables
If your application requires API keys or other sensitive information, you should set them as environment variables in your Hugging Face Space settings rather than including them in your code repository.
## Troubleshooting
If you encounter any issues with the deployment:
1. Check the build logs in your Hugging Face Space
2. Verify that all required files are included in your repository
3. Make sure your application is properly configured to run on port 7860 |