Prophet API Add-on for Home Assistant
893
Container with python:3.11-slim for arm that implements an api to generate predictions with Prophet. Here’s a possible description for your Docker Hub repository:
Prophet API Add-on for Home Assistant
This Docker container provides a lightweight REST API based on Flask for time series forecasting using Meta's (formerly Facebook) Prophet model. It is specifically designed to integrate as an add-on in Home Assistant, enabling easy forecasting based on historical data.
Send a POST request to the API with date and value data in the following format:
{
"data": [
{"ds": "2024-01-01", "y": 10},
{"ds": "2024-01-02", "y": 15},
{"ds": "2024-01-03", "y": 13}
]
}
The API will return a forecast of future values.
This container is ideal for home automation and applications that require local time series forecasting, especially on ARM architectures.
Example request:
import requests
import json
# API URL
url = "http://<container IP>:5000/forecast"
# sample data (dates and values)
data = {
"data": [
{"ds": "2024-01-01", "y": 10},
{"ds": "2024-01-02", "y": 15},
{"ds": "2024-01-03", "y": 13},
{"ds": "2024-01-04", "y": 18}
]
}
# Hacer la solicitud POST
response = requests.post(url, json=data)
# Verificar la respuesta
if response.status_code == 200:
forecast = response.json()
print("Forecast:")
print(json.dumps(forecast, indent=2))
else:
print("Error:", response.status_code)
print(response.text)
You get a response with forecast for 30 periods
Content type
Image
Digest
sha256:b64ae8a1e…
Size
271.4 MB
Last updated
almost 2 years ago
docker pull mgenrique/prophet-api