lamminhtungquan/weather-forecast
0
Weather Forecast API on Hugging Face Spaces
This repository is configured to run as a Docker Space on Hugging Face.
Space URL:
https://huggingface.co/spaces/lamminhtungquan/weather-forecasthttps://lamminhtungquan-weather-forecast.hf.space
API endpoints
GET /POST /smart-predictPOST /auto-irrigationGET /docs
Notes
- The app stores irrigation schedules in
irrigation_db.json. - On Hugging Face Spaces, local file storage is not guaranteed to be persistent forever.
- For demo usage, the current setup is acceptable.
- For production persistence, move schedule data to an external database.
Local run
Run with Python
pip install -r requirements.txt
python app.pyOpen:
http://127.0.0.1:8000/docs
Run with Docker
docker build -t weather-forecast .
docker run --rm -p 8000:8000 weather-forecastOpen:
http://127.0.0.1:8000/docs
Deploy to Hugging Face Spaces
- Create a new Space on Hugging Face
- Choose
Dockeras the SDK - Push this repository to the Space repository at
lamminhtungquan/weather-forecast - Wait for the build to finish
- Open
/docson the Space URL to test the API
