ปรับปรุงโค้ดเล็กน้อย และย้ายที่อยู่ Dashboard
This commit is contained in:
parent
d90b233bbc
commit
cf6372e81a
@ -73,7 +73,7 @@
|
||||
## 📈 ตัวอย่าง Dashboard
|
||||
|
||||
ตัวอย่างการสร้าง Dashboard ที่แสดงข้อมูลคุณภาพอากาศและการทำนาย AQI ในอนาคตโดยใช้ข้อมูลจาก ClickHouse และ AI สนับสนุน Data-driven decision:
|
||||
https://metabase.softwarecraft.tech/public/dashboard/bb9e4187-f60e-46f2-ba79-5e220ebe0684
|
||||
https://analytics.softwarecraft.tech/public/dashboard/0107425a-50aa-4fd6-8d78-d29f4c9d76ae
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ def predict_aqi(latest_record):
|
||||
from requests.auth import HTTPBasicAuth
|
||||
|
||||
# อ่านค่าจาก .env
|
||||
mindsdb_api_url = os.getenv("MINDSDB_REST_API_URL", "https://mindsdb.softwarecraft.tech/api/projects/mindsdb/models/aqi_forecaster/predict")
|
||||
mindsdb_api_url = os.getenv("MINDSDB_REST_API_URL")
|
||||
mindsdb_user = os.getenv("MINDSDB_USER")
|
||||
mindsdb_pass = os.getenv("MINDSDB_PASSWORD")
|
||||
|
||||
|
||||
@ -6,7 +6,8 @@ from requests.auth import HTTPBasicAuth
|
||||
|
||||
load_dotenv()
|
||||
|
||||
KAFKA_REST_PROXY = "https://kafka-rest-proxy.softwarecraft.tech" # เปลี่ยนให้เป็น https://
|
||||
# ใช้ environment variable แทน hardcoded URL
|
||||
KAFKA_REST_PROXY = os.getenv("KAFKA_REST_PROXY_URL")
|
||||
auth = HTTPBasicAuth(os.getenv('KAFKA_API_USER'), os.getenv('KAFKA_API_PASS'))
|
||||
|
||||
def send_to_kafka(topic, data):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user