Buckets:
bbkdevops/unicosys-hypergraph-bucket / tinymind-native-colab-handoff /bundle /model /tinymind-apex /api.py
| from __future__ import annotations | |
| from pathlib import Path | |
| from typing import Any | |
| from fastapi import FastAPI | |
| from pydantic import BaseModel | |
| from tinymind_apex import TinyMindApex | |
| class GenerateRequest(BaseModel): | |
| query: str | |
| top_k: int = 5 | |
| app = FastAPI(title="TinyMind Apex Runtime", version="1.0.0") | |
| model = TinyMindApex(Path(r"D:\ad\tinymind\model\tinymind-apex")) | |
| def health() -> dict[str, Any]: | |
| return { | |
| "ok": True, | |
| "records": model.manifest["records"], | |
| "model": model.manifest["name"], | |
| "neural_core": model.neural is not None, | |
| } | |
| def generate(req: GenerateRequest) -> dict[str, Any]: | |
| return model.generate(req.query, req.top_k) | |
Xet Storage Details
- Size:
- 740 Bytes
- Xet hash:
- fac2df00b02e3fefac0567aaf8f6b1d298bbe3dff8ed831d74992f9d27d6df8f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.