himipo's picture
Deploy OCR Model Workbench
86c13ad verified
Raw
History Blame Contribute Delete
404 Bytes
from __future__ import annotations
import os
from worker_common import build_demo, configure_cache
configure_cache()
from adapter import adapter # noqa: E402
demo = build_demo(adapter)
if __name__ == "__main__":
demo.queue(default_concurrency_limit=1, max_size=int(os.getenv("QUEUE_SIZE", "8"))).launch(
server_name="0.0.0.0",
server_port=int(os.getenv("PORT", "7860")),
)