CoolFace
Apppublic

TanujInsane/document-classification-env

sourceHugging Faceupdated 5mo agoView on Hugging Face
3likes
__init__.py33 linesDownload Raw Back to root
1"""2Document Classification Environment — OpenEnv-compliant package.3 4Install:5    pip install git+https://huggingface.co/spaces/TanujInsane/document-classification-env6 7Usage (sync):8    from document_classification_env import DocEnv, DocAction9 10    with DocEnv(base_url="https://tanujinsane-document-classification-env.hf.space").sync() as env:11        result = env.reset()12        result = env.step(DocAction(action_id=0, difficulty="easy"))13        print(result.observation.content[:120])14        print("reward:", result.reward, "done:", result.done)15 16Usage (async):17    import asyncio18    from document_classification_env import DocEnv, DocAction19 20    async def main():21        async with DocEnv(base_url="https://tanujinsane-document-classification-env.hf.space") as env:22            result = await env.reset()23            result = await env.step(DocAction(action_id=0, difficulty="easy"))24            print(result.observation.content[:120])25 26    asyncio.run(main())27"""28 29from .client import DocEnv30from .models import DocAction, DocObservation, DocState31 32__all__ = ["DocEnv", "DocAction", "DocObservation", "DocState"]33