Spaces:
Runtime error
Runtime error
Download src/api/models.py from vengen9840/PaperLens: direct link, hf CLI and curl.
- Browser
- Download file 689 Bytes
-
https://huggingface.co/spaces/vengen9840/PaperLens/resolve/main/src/api/models.py
- Command line
-
hf download hf://spaces/vengen9840/PaperLens/src/api/models.py
-
curl -L -o models.py https://huggingface.co/spaces/vengen9840/PaperLens/resolve/main/src/api/models.py
689 Bytes
| from pydantic import BaseModel | |
| from typing import Optional, List | |
| class SearchRequest (BaseModel): | |
| query: str | |
| top_k: Optional[int] = 10 | |
| class PaperResult (BaseModel): | |
| id:str | |
| title: str | |
| authors: str | |
| abstract: str | |
| year :int | |
| field :str | |
| url: str | |
| score: float | |
| class SearchResponse (BaseModel): | |
| query: str | |
| results: List[PaperResult] | |
| total:int | |
| latency_ms: float | |
| class PaperDetail(BaseModel): | |
| id:str | |
| title: str | |
| authors: str | |
| abstract: str | |
| year:int | |
| field :str | |
| url: str | |
| class HealthResponse(BaseModel): | |
| status: str | |
| paper_indexed: int | |
| index_loading:bool | |
| embedding_loading: bool | |