Spaces:
Sleeping
Sleeping
Download app.py from Frederic-CellNum/OCR_MinerU2: direct link, hf CLI and curl.
- Browser
- Download file 391 Bytes
-
https://huggingface.co/spaces/Frederic-CellNum/OCR_MinerU2/resolve/main/app.py
- Command line
-
hf download hf://spaces/Frederic-CellNum/OCR_MinerU2/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Frederic-CellNum/OCR_MinerU2/resolve/main/app.py
391 Bytes
| from pydantic import BaseModel | |
| from fastapi import FastAPI | |
| # Initialize FastAPI app | |
| app = FastAPI(title="PDF Data Extraction") | |
| class Item(BaseModel): | |
| name: str | |
| description: str = None | |
| async def predict(item: Item): | |
| return {"result": f"Vous avez envoyé : {item.name}"} | |
| async def root(): | |
| return {"message": "Bienvenue sur mon API !"} | |