Spaces:
Sleeping
Sleeping
File size: 1,587 Bytes
54fc332 9abcdcf | 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 | ---
title: Test File
emoji: π₯
colorFrom: purple
colorTo: yellow
sdk: docker
pinned: false
---
# Flask Test App for Hugging Face Spaces
A simple Flask web application designed for testing deployment on Hugging Face Spaces.
## Features
- Simple web interface with greeting functionality
- REST API endpoint for testing
- Health check endpoint
- Responsive design
- Ready for Hugging Face Spaces deployment
## Project Structure
```
flask-test-app/
βββ app.py # Main Flask application
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker configuration
βββ README.md # This file
βββ templates/
βββ index.html # HTML template
```
## Local Development
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Run the application:
```bash
python app.py
```
3. Open your browser and navigate to `http://localhost:7860`
## API Endpoints
- `GET /` - Main web interface
- `POST /api/greet` - Greeting API endpoint
- `GET /health` - Health check endpoint
## Deployment on Hugging Face Spaces
1. Create a new Space on Hugging Face
2. Choose "Docker" as the SDK
3. Upload all the files from this project
4. The app will automatically deploy and be accessible via your Space URL
## Testing the Deployment
Once deployed, you can test the application by:
1. Visiting the main page to see the web interface
2. Using the greeting form to test the API
3. Checking the health endpoint at `/health`
The application runs on port 7860, which is the default port for Hugging Face Spaces. |