MCPcopy
hub / github.com/baidu/Unlimited-OCR / get_ngram_processor_str

Function get_ngram_processor_str

infer.py:40–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def get_ngram_processor_str():
41 global NO_REPEAT_NGRAM_PROCESSOR_STR
42 if NO_REPEAT_NGRAM_PROCESSOR_STR is None:
43 from sglang.srt.sampling.custom_logit_processor import (
44 DeepseekOCRNoRepeatNGramLogitProcessor,
45 )
46 NO_REPEAT_NGRAM_PROCESSOR_STR = DeepseekOCRNoRepeatNGramLogitProcessor.to_str()
47 return NO_REPEAT_NGRAM_PROCESSOR_STR
48
49
50def pdf_to_images(pdf_path: str, dpi: int = 300) -> list[str]:

Callers 1

infer_oneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected