Spaces:
Build error
Build error
File size: 524 Bytes
1aa12c7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/usr/bin/env python3
"""Simple OCR server using vLLM for dots.mocr model"""
import os
import subprocess
# Configuration
MODEL_PATH = os.environ.get('MODEL_PATH', 'rednote-hilab/dots.mocr-svg')
PORT = int(os.environ.get('PORT', 7860))
# Start vLLM server directly
subprocess.run([
"vllm", "serve", MODEL_PATH,
"--port", str(PORT),
"--host", "0.0.0.0",
"--tensor-parallel-size", "1",
"--gpu-memory-utilization", "0.8",
"--max-model-len", "4096",
"--enforce-eager",
"--trust-remote-code"
])
|