File size: 982 Bytes
ab59b5c a1ba68f ab59b5c a1ba68f |
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 |
---
title: Flask Web App
emoji: π
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
---
# Flask Web Application for Hugging Face Spaces
This is a simple Flask web application deployed on Hugging Face Spaces. It provides:
- A clean web interface showing the current server time
- A REST API with endpoints for getting the current time and echoing data
- Cross-origin resource sharing (CORS) support for API access from other domains
## API Endpoints
- `/api/time` - GET request that returns the current server time
- `/api/echo` - POST request that echoes back any JSON data sent to it
## Local Development
To run this application locally:
1. Install the required dependencies:
```
pip install -r requirements.txt
```
2. Run the Flask application:
```
python app.py
```
3. Open your browser and navigate to `http://localhost:7860`
## Deployment
This application is configured for deployment on Hugging Face Spaces using Docker.
|