Initial commit: добавление проекта predictV1

Включает модели ML для предсказаний, API маршруты, скрипты обучения и данные.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-21 17:22:58 +03:00
commit 8a134239d7
42 changed files with 12831 additions and 0 deletions

31
serve.py Normal file
View File

@@ -0,0 +1,31 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from routes.predict import router as predict_router
from routes.heroes import router as heroes_router
from routes.match import router as match_router
from routes.teams import router as teams_router
from routes.players import router as players_router
app = FastAPI()
# CORS настройки
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(predict_router)
app.include_router(heroes_router)
app.include_router(match_router)
app.include_router(teams_router)
app.include_router(players_router)
@app.get("/features")
def features():
# Чтобы легко проверить, что ждёт модель
return {"feature_order": feature_order, "defaults": DEFAULTS}