SuperAI_Forecast / README.md
Thang6822
Deploy OHLC4 forecast line and Hugging Face runtime fixes
43b0e93
|
Raw
History Blame
2.6 kB
metadata
title: Kronos AI
emoji: 🚀
colorFrom: blue
colorTo: red
sdk: docker
app_port: 7860
pinned: false

Kronos AI Analysis

Kronos AI Analysis is a FastAPI + Lightweight Charts application for:

  • loading market data from multiple providers with automatic fallback
  • calculating technical indicators
  • generating AI forecasts with Kronos
  • serving the web UI directly from the backend

Runtime Requirements

  • Windows with Python 3.11 installed
  • Internet access for live market data
  • Internet access on first Kronos model load if the model is not already cached locally

Project Layout

Kronos_AI_Analysis/
|-- backend/
|   |-- main.py
|   `-- launcher.py
|-- frontend/
|   `-- index.html
|-- Kronos-master/
|   `-- model/
|-- dist/
|   `-- SuperAI_Analysis.exe
|-- requirements.txt
`-- run_server.bat

Recommended Start

Run:

run_server.bat

The startup script now:

  1. checks Python 3.11
  2. repairs a broken virtual environment if needed
  3. installs the full runtime dependency set
  4. verifies Kronos can be imported
  5. starts the FastAPI server on a random free local port and opens the browser automatically

Manual Start

py -3.11 -m venv venv
venv\Scripts\python.exe -m pip install -r requirements.txt
venv\Scripts\python.exe -m backend.launcher

Important Notes

  • This project uses Kronos, not TimesFM.
  • Hugging Face Docker Spaces are pinned to port 7860, while the local Windows launcher uses a random free port.
  • Kronos source code is loaded from Kronos-master.
  • Kronos weights are loaded from Hugging Face via:
    • NeoQuasar/Kronos-base
    • NeoQuasar/Kronos-Tokenizer-base
  • The first AI forecast can take longer because the model may warm up or download into cache.

Key Endpoints

  • GET /api/health
  • GET /api/symbols
  • GET /api/historical/{symbol}
  • GET /api/indicators/{symbol}
  • GET /api/forecast/{symbol}
  • GET /api/market-status
  • GET /api/crypto/market
  • WS /ws/price/{symbol}

Health Expectations

When the system is healthy:

  • /api/health returns status: online
  • kronos.available is true
  • kronos.loaded becomes true after warmup or after the first forecast
  • the frontend loads from the same backend origin

Troubleshooting

  • If Python 3.11 is missing, install it first.
  • If a previous venv was copied from another machine, run_server.bat rebuilds it.
  • If forecasts fail, check /api/health and confirm Kronos reports as available and loaded.
  • If market data fails, check network reachability to Binance, Bybit, CoinGecko, Twelve Data, Finnhub, and Yahoo Finance.