Spaces:
Running
Running
File size: 2,390 Bytes
7c78a60 | 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | # 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
```text
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:
```bat
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 `http://127.0.0.1:8000`
## Manual Start
```bat
py -3.11 -m venv venv
venv\Scripts\python.exe -m pip install -r requirements.txt
venv\Scripts\python.exe -m uvicorn backend.main:app --host 127.0.0.1 --port 8000 --reload
```
## Important Notes
- This project uses Kronos, not TimesFM.
- 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.
|