Download _test_run_extraction.py from Basel0/qshub: direct link, hf CLI and curl.
- Browser
- Download file 372 Bytes
-
https://huggingface.co/spaces/Basel0/qshub/resolve/main/_test_run_extraction.py
- Command line
-
hf download hf://spaces/Basel0/qshub/_test_run_extraction.py
-
curl -L -o _test_run_extraction.py https://huggingface.co/spaces/Basel0/qshub/resolve/main/_test_run_extraction.py
372 Bytes
| import asyncio | |
| from api.routers.extraction import run_extraction | |
| from pydantic import BaseModel | |
| class Req(BaseModel): | |
| project_id: int | |
| force_reextract: bool = False | |
| async def main(): | |
| req = Req(project_id=1590001, force_reextract=True) | |
| async for msg in run_extraction(req, {'id': 1}): | |
| print(msg) | |
| if __name__ == "__main__": | |
| asyncio.run(main()) | |